home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1998 November / Freeware November 1998.img / dist / fw_gnuplot.idb / usr / freeware / doc / gnuplot / gnuplot.info.z / gnuplot.info
Text File  |  1998-05-21  |  279KB  |  7,006 lines

  1. This file is gnuplot.info created by doc2info from ./gnuplot.doc.
  2.  
  3. 
  4. File: gnuplot.info, Node: Top, Prev: (dir), Next: gnuplot, Up: (dir)
  5.  
  6. gnuplot
  7. *******
  8.  
  9.  
  10. * Menu:
  11.  
  12. * gnuplot::
  13. * Commands::
  14. * Graphical User Interfaces::
  15. * Bugs::
  16.  
  17. 
  18. File: gnuplot.info, Node: gnuplot, Prev: Top, Up: Top, Next: Copyright
  19.  
  20.  
  21. * Menu:
  22.  
  23. * Copyright::
  24. * Introduction::
  25. * Seeking-assistance::
  26. * What's New in version 3.6::
  27. * Command-line-editing::
  28. * Comments::
  29. * Coordinates::
  30. * Environment::
  31. * Expressions::
  32. * Glossary::
  33. * Plotting::
  34. * Start-up::
  35. * Substitution::
  36. * Syntax::
  37. * Time/Date data::
  38.  
  39. 
  40. File: gnuplot.info, Node: Copyright, Prev: gnuplot, Up: gnuplot, Next: Introduction
  41.  
  42.        Copyright (C) 1986 - 1993, 1997   Thomas Williams, Colin Kelley
  43.  
  44.  Permission to use, copy, and distribute this software and its documentation
  45.  for any purpose with or without fee is hereby granted, provided that the
  46.  above copyright notice appears in all copies and that both that copyright
  47.  notice and this permission notice appear in supporting documentation.
  48.  
  49.  Permission to modify the software is granted, but not the right to distribute
  50.  the modified code.  Modifications are to be distributed as patches to the
  51.  released version.
  52.  
  53.  This software is provided "as is" without express or implied warranty.
  54.  
  55.  
  56.        AUTHORS
  57.  
  58.        Original Software:
  59.           Thomas Williams,  Colin Kelley.
  60.  
  61.        Gnuplot 2.0 additions:
  62.           Russell Lang, Dave Kotz, John Campbell.
  63.  
  64.        Gnuplot 3.0 additions:
  65.           Gershon Elber and many others.
  66.  
  67. 
  68. File: gnuplot.info, Node: Introduction, Prev: Copyright, Up: gnuplot, Next: Seeking-assistance
  69.  
  70.  `gnuplot` (*note gnuplot:: ) is a command-driven interactive function and data
  71.  plotting program. It is case sensitive (commands and function names written in
  72.  lowercase are not the same as those written in CAPS).  All command names may
  73.  be abbreviated as long as the abbreviation is not ambiguous.  Any number of
  74.  commands may appear on a line (with the exception that `load` (*note load:: )
  75.  or  `call` (*note call:: ) must be the final command), separated by semicolons
  76.  (;).  Strings are indicated with quotes. They may be either single or double
  77.  quotation marks, e.g.,
  78.  
  79.        load "filename"
  80.        cd 'dir'
  81.  
  82.  although there are some subtle differences (see `syntax` (*note Syntax:: ) for
  83.  more details).
  84.  
  85.  Any command-line arguments are assumed to be names of files containing
  86.  `gnuplot` commands, with the exception of standard X11 arguments, which are
  87.  processed first.  Each file is loaded with the `load` command, in the order
  88.  specified.  `gnuplot` exits after the last file is processed.  When no load
  89.  files are named, `gnuplot` enters into an interactive mode.
  90.  
  91.  Many `gnuplot` commands have multiple options.  These options must appear in
  92.  the proper order, although unwanted ones may be omitted in most cases.  Thus
  93.  if the entire command is "command a b c", then "command a c" will probably
  94.  work, but "command c a" will fail.
  95.  
  96.  Commands may extend over several input lines by ending each line but the last
  97.  with a backslash (\).  The backslash must be the _last_ character on each
  98.  line.  The effect is as if the backslash and newline were not there.  That
  99.  is, no white space is implied, nor is a comment terminated.  Therefore,
  100.  commenting out a continued line comments out the entire command (see
  101.  `comment`).  But note that if an error occurs somewhere on a multi-line
  102.  command, the parser may not be able to locate precisely where the error is
  103.  and in that case will not necessarily point to the correct line.
  104.  
  105.  In this document, curly braces ({}) denote optional arguments and a vertical
  106.  bar (|) separates mutually exclusive choices.  `gnuplot` keywords or `help`
  107.  (*note help:: ) topics are indicated by backquotes or `boldface` (where
  108.  available).  Angle brackets (<>) are used to mark replaceable tokens.
  109.  
  110.  For on-line help on any topic, type `help` followed by the name of the topic
  111.  or just `help` or `?` to get a menu of available topics.
  112.  
  113.  The new `gnuplot` user should begin by reading about the `plot`
  114.  (*note plot:: ) command (if on-line, type `help plot`).
  115.  
  116.  
  117. 
  118. File: gnuplot.info, Node: Seeking-assistance, Prev: Introduction, Up: gnuplot, Next: What's New in version 3.6
  119.  
  120.  There is a mailing list for `gnuplot` (*note gnuplot:: ) users.  Note,
  121.  however, that the newsgroup       comp.graphics.apps.gnuplot is identical to
  122.  the mailing list (they both carry the same set of messages). We prefer that
  123.  you read the messages through the newsgroup rather than subscribing to the
  124.  mailing list.  Administrative requests should be sent to
  125.        majordomo@dartmouth.edu Send a message with the body (not the subject)
  126.  consisting of the single word "help" (without the quotes) for more details.
  127.  
  128.  The address for mailing to list members is:
  129.        info-gnuplot@dartmouth.edu
  130.  
  131.  Bug reports and code contributions should be mailed to:
  132.        bug-gnuplot@dartmouth.edu
  133.  
  134.  The list of those interested in beta-test versions is:
  135.        info-gnuplot-beta@dartmouth.edu
  136.  
  137.  There is also a World Wide Web page with up-to-date information, including
  138.  known bugs:
  139.        http://www.cs.dartmouth.edu/gnuplot
  140.  
  141.  Before seeking help, please check the
  142.  FAQ (Frequently Asked Questions) list.
  143.  If you do not have a copy of the FAQ, you may request a copy by email from
  144.  the Majordomo address above, or see the WWW `gnuplot` page.
  145.  
  146.  When posting a question, please include full details of the version of
  147.  `gnuplot`, the machine, and operating system you are using.  A _small_ script
  148.  demonstrating the problem may be useful.  Function plots are preferable to
  149.  datafile plots.  If email-ing to info-gnuplot, please state whether or not
  150.  you are subscribed to the list, so that users who use news will know to email
  151.  a reply to you.  There is a form for such postings on the WWW site.
  152.  
  153. 
  154. File: gnuplot.info, Node: What's New in version 3.6, Prev: Seeking-assistance, Up: gnuplot, Next: Command-line-editing
  155.  
  156.  Gnuplot version 3.6 contains many new features.  This section gives a partial
  157.  list and links to the new items in no particular order.
  158.  
  159.  1. `fit f(x) 'file' via` uses the Marquardt-Levenberg method to fit data.
  160.  (This is only slightly different from the `gnufit` patch available for 3.5.)
  161.  
  162.  2. Greatly expanded `using` (*note using:: ) command.  See plot using.
  163.  
  164.  3. `set timefmt` (*note timefmt:: ) allows for the use of dates as input and
  165.  output for time series plots.  See `Time/Date data` and timedat.dem.
  166.  
  167.  4. Multiline labels and font selection in some drivers.
  168.  
  169.  5. Minor (unlabeled) tics.  See `set mxtics` (*note mxtics:: ).
  170.  
  171.  6. `key` (*note key:: ) options for moving the key box in the page (and even
  172.  outside of the plot), putting a title on it and a box around it, and
  173.  more.  See `set key`.
  174.  
  175.  7. Multiplots on a single logical page with `set multiplot`
  176.  (*note multiplot:: ).
  177.  
  178.  8. Enhanced `postscript` (*note postscript:: ) driver with super/subscripts
  179.  and font changes. (This was a separate driver (`enhpost`) that was available
  180.  as a patch for 3.5.)
  181.  
  182.  9. Second axes:  use the top and right axes independently of the bottom and
  183.  left, both for plotting and labels.  See `plot` (*note plot:: ).
  184.  
  185.  10. Special datafile names `'-'` and `""`.  See `plot special-filenames`
  186.  (*note special-filenames:: ).
  187.  
  188.  11. Additional coordinate systems for labels and arrows.  See `coordinates`
  189.  (*note Coordinates:: ).
  190.  
  191.  12. `set size` (*note size:: ) can try to plot with a specified aspect ratio.
  192.  
  193.  13. `set missing` (*note missing:: ) now treats missing data correctly.
  194.  
  195.  14. The `call` (*note call:: ) command:  `load` (*note load:: ) with
  196.  arguments.
  197.  
  198.  15. More flexible `range` commands with `reverse` and `writeback` keywords.
  199.  
  200.  16. `set encoding` (*note encoding:: ) for multi-lingual encoding.
  201.  
  202.  17. New `x11` (*note x11:: ) driver with persistent and multiple windows.
  203.  
  204.  18. New plotting styles: `xerrorbars` (*note xerrorbars:: ),  `histeps`
  205.  (*note histeps:: ),  `financebars` (*note financebars:: ) and more. See `set
  206.  style` (*note style:: ).
  207.  
  208.  19. New tic label formats, including `"%l %L"` which uses the mantissa and
  209.  exponents to a given base for labels.  See `set format` (*note format:: ).
  210.  
  211.  20. New drivers, including `cgm` (*note cgm:: ) for inclusion into MS-Office
  212.  applications and `gif` for serving plots to the WEB.
  213.  
  214.  21. Smoothing and spline-fitting options for `plot`.  See `plot smooth`
  215.  (*note smooth:: ).
  216.  
  217.  22. `set margin` (*note margin:: ) and  `set origin` (*note origin:: ) give
  218.  much better control over where a graph appears on the page.
  219.  
  220.  23. `set border` (*note border:: ) now controls each border individually.
  221.  
  222.  24. The new commands `if` (*note if:: ) and  `reread` (*note reread:: ) allow
  223.  command loops.
  224.  
  225.  25. Point styles and sizes, line types and widths can be specified on the
  226.  `plot` command.  Line types and widths can also be specified for grids,
  227.  borders, tics and arrows.  See `plot with` (*note with:: ).  Furthermore these
  228.  types may be combined and stored for further use.  See `set linestyle`
  229.  (*note linestyle:: ).
  230.  
  231.  26. Text (labels, tic labels, and the time stamp) can be written vertically
  232.  by those terminals capable of doing so.
  233.  
  234. 
  235. File: gnuplot.info, Node: Command-line-editing, Prev: What's New in version 3.6, Up: gnuplot, Next: Comments
  236.  
  237.  Command-line editing is supported by the Unix, Atari, VMS, MS-DOS and OS/2
  238.  versions of `gnuplot` (*note gnuplot:: ).  Also, a history mechanism allows
  239.  previous commands to be edited and re-executed.  After the command line has
  240.  been edited, a newline or carriage return will enter the entire line without
  241.  regard to where the cursor is positioned.
  242.  
  243.  (The readline function in `gnuplot` is not the same as the readline used in
  244.  GNU Bash and GNU Emacs.  If the GNU version is desired, it may be selected
  245.  instead of the `gnuplot` version at compile time.)
  246.  
  247.  
  248.  The editing commands are as follows:
  249.  
  250.        `Line-editing`:
  251.  
  252.        ^B    moves back a single character.
  253.        ^F    moves forward a single character.
  254.        ^A    moves to the beginning of the line.
  255.        ^E    moves to the end of the line.
  256.        ^H    and DEL delete the previous character.
  257.        ^D    deletes the current character.
  258.        ^K    deletes from current position to the end of line.
  259.        ^L,^R redraws line in case it gets trashed.
  260.        ^U    deletes the entire line.
  261.        ^W    deletes the last word.
  262.  
  263.        `History`:
  264.  
  265.        ^P    moves back through history.
  266.        ^N    moves forward through history.
  267.  
  268.  On the IBM PC, the use of a TSR program such as DOSEDIT or CED may be desired
  269.  for line editing.  The default makefile assumes that this is the case;  by
  270.  default `gnuplot` will be compiled with no line-editing capability.  If you
  271.  want to use `gnuplot`'s line editing, set READLINE in the makefile and add
  272.  readline.obj to the link file.  The following arrow keys may be used on the
  273.  IBM PC and Atari versions if readline is used:
  274.  
  275.        Left  Arrow      - same as ^B.
  276.        Right Arrow      - same as ^F.
  277.        Ctrl Left  Arrow - same as ^A.
  278.        Ctrl Right Arrow - same as ^E.
  279.        Up    Arrow      - same as ^P.
  280.        Down  Arrow      - same as ^N.
  281.  
  282.  The Atari version of readline defines some additional key aliases:
  283.  
  284.        Undo            - same as ^L.
  285.        Home            - same as ^A.
  286.        Ctrl Home       - same as ^E.
  287.        Esc             - same as ^U.
  288.        Help            - `help` (*note help:: ) plus return.       Ctrl Help
  289.        - `help `.
  290.  
  291.  
  292. 
  293. File: gnuplot.info, Node: Comments, Prev: Command-line-editing, Up: gnuplot, Next: Coordinates
  294.  
  295.  Comments are supported as follows: a # may appear in most places in a line
  296.  and `gnuplot` (*note gnuplot:: ) will ignore the rest of the line.  It will
  297.  not have this effect inside quotes, inside numbers (including complex
  298.  numbers), inside command substitutions, etc.  In short, it works anywhere it
  299.  makes sense to work.
  300.  
  301.  
  302. 
  303. File: gnuplot.info, Node: Coordinates, Prev: Comments, Up: gnuplot, Next: Environment
  304.  
  305.  The commands `set arrow` (*note arrow:: ),  `set key` (*note key:: ), and
  306.   `set label` (*note label:: ) allow you to draw something at an arbitrary
  307.  position on the graph.  This position is specified by the syntax:
  308.  
  309.        {<system>} <x>, {<system>} <y> {,{<system>} <z>}
  310.  
  311.  Each <system> can either be `first`, `second`, `graph` or `screen`.
  312.  
  313.  `first` places the x, y, or z coordinate in the system defined by the left
  314.  and bottom axes; `second` places it in the system defined by the second axes
  315.  (top and right); `graph` specifies the area within the axes---0,0 is bottom
  316.  left and 1,1 is top right (for splot, 0,0,0 is bottom left of plotting area;
  317.  use negative z to get to the base---see `set ticslevel` (*note ticslevel:: ));
  318.  and screen specifies the screen area (the entire area---not just the portion
  319.  selected by `set size` (*note size:: )), with 0,0 at bottom left and 1,1 at
  320.  top right.
  321.  
  322.  If the coordinate system for x is not specified, `first` is used.  If the
  323.  system for y is not specified, the one used for x is adopted.
  324.  
  325.  If one (or more) axis is timeseries, the appropriate coordinate should
  326.  be given as a quoted time string according to the `timefmt` (*note timefmt:: )
  327.  format string. See `set xdata` (*note xdata:: ) and set timefmt.  .  `gnuplot`
  328.  (*note gnuplot:: ) will also accept an integer expression, which will be
  329.  interpreted as seconds from 1 January 2000.
  330.  
  331.  
  332. 
  333. File: gnuplot.info, Node: Environment, Prev: Coordinates, Up: gnuplot, Next: Expressions
  334.  
  335.  A number of shell environment variables are understood by `gnuplot`
  336.  (*note gnuplot:: ).  None of these are required, but may be useful.
  337.  
  338.  If GNUTERM is defined, it is used as the name of the terminal type to be
  339.  used.  This overrides any terminal type sensed by `gnuplot` on start-up, but
  340.  is itself overridden by the .gnuplot (or equivalent) start-up file (see
  341.  `start-up`) and, of course, by later explicit changes.
  342.  
  343.  On Unix, AmigaDOS, AtariTOS, MS-DOS and OS/2, GNUHELP may be defined to be
  344.  the pathname of the HELP file (gnuplot.gih).
  345.  
  346.  On VMS, the logical name gnuplot$HELP should be defined as the name of the
  347.  help library for `gnuplot`.  The `gnuplot` help can be put inside any system
  348.  help library, allowing access to help from both within and outside `gnuplot`
  349.  if desired.
  350.  
  351.  On Unix, HOME is used as the name of a directory to search for a .gnuplot
  352.  file if none is found in the current directory.  On AmigaDOS, AtariTOS,
  353.  MS-DOS and OS/2, gnuplot is used.  On VMS, SYS$LOGIN: is used. See `help
  354.  (*note help:: ) start-up`.
  355.  
  356.  On Unix, PAGER is used as an output filter for help messages.
  357.  
  358.  On Unix, AtariTOS and AmigaDOS, SHELL is used for the `shell` (*note shell:: )
  359.  command.  On MS-DOS and OS/2, COMSPEC is used for the `shell` command.
  360.  
  361.  On MS-DOS, if the BGI interface is used, BGI is used to point to the full
  362.  path of the BGI drivers directory.  Furthermore, SVGA is used to name the
  363.  Super VGA BGI driver in 800x600 resolution and its mode of operation is
  364.  Name.Mode.  E.g., if the Super VGA driver is
  365.        C:\TC\BGI\SVGADRV.BGI
  366.  and mode 3 is used for 800x600 resolution, then use the following:
  367.        set BGI=C:\TC\BGI
  368.        set SVGA=SVGADRV.3
  369.  
  370.  FIT_SCRIPT may be used to specify a `gnuplot` command to be executed when a
  371.  fit is interrupted---see `fit` (*note fit:: ).  FIT_LOG specifies the filename
  372.  of the logfile maintained by fit.
  373.  
  374.  
  375. 
  376. File: gnuplot.info, Node: Expressions, Prev: Environment, Up: gnuplot, Next: Functions
  377.  
  378.  In general, any mathematical expression accepted by C, FORTRAN, Pascal, or
  379.  BASIC is valid.  The precedence of these operators is determined by the
  380.  specifications of the C programming language.  White space (spaces and tabs)
  381.  is ignored inside expressions.
  382.  
  383.  Complex constants are expressed as {<real>,<imag>}, where <real> and <imag>
  384.  must be numerical constants.  For example, {3,2} represents 3 + 2i; {0,1}
  385.  represents 'i' itself.  The curly braces are explicitly required here.
  386.  
  387.  Note that gnuplot uses both "real" and "integer" arithmetic, like FORTRAN and
  388.  C.  Integers are entered as "1", "-10", etc; reals as "1.0", "-10.0", "1e1",
  389.  3.5e-1, etc.  The most important difference between the two forms is in
  390.  division: division of integers truncates: 5/2 = 2; division of reals does
  391.  not: 5.0/2.0 = 2.5.  In mixed expressions, integers are "promoted" to reals
  392.  before evaluation: 5/2e0 = 2.5.  The result of division of a negative integer
  393.  by a positive one may vary among compilers.  Try a test like "print -5/2" to
  394.  determine if your system chooses -2 or -3 as the answer.
  395.  
  396.  The real and imaginary parts of complex expressions are always real, whatever
  397.  the form in which they are entered: in {3,2} the "3" and "2" are reals, not
  398.  integers.
  399.  
  400. * Menu:
  401.  
  402. * Functions::
  403. * Operators::
  404. * User-defined::
  405.  
  406. 
  407. File: gnuplot.info, Node: Functions, Prev: Expressions, Up: Expressions, Next: abs
  408.  
  409.  The functions in `gnuplot` (*note gnuplot:: ) are the same as the
  410.  corresponding functions in the Unix math library, except that all functions
  411.  accept integer, real, and complex arguments, unless otherwise noted.
  412.  
  413.  For those functions that accept or return angles that may be given in either
  414.  degrees or radians (sin(x), cos(x), tan(x), asin(x), acos(x), atan(x),
  415.  atan2(x) and arg(z)), the unit may be selected by `set angles`
  416.  (*note angles:: ), which defaults to radians.
  417.  
  418.  
  419. * Menu:
  420.  
  421. * abs::
  422. * acos::
  423. * acosh::
  424. * arg::
  425. * asin::
  426. * asinh::
  427. * atan::
  428. * atan2::
  429. * atanh::
  430. * besj0::
  431. * besj1::
  432. * besy0::
  433. * besy1::
  434. * ceil::
  435. * cos::
  436. * cosh::
  437. * erf::
  438. * erfc::
  439. * exp::
  440. * floor::
  441. * gamma::
  442. * ibeta::
  443. * inverf::
  444. * igamma::
  445. * imag::
  446. * invnorm::
  447. * int::
  448. * lgamma::
  449. * log::
  450. * log10::
  451. * norm::
  452. * rand::
  453. * real::
  454. * sgn::
  455. * sin::
  456. * sinh::
  457. * sqrt::
  458. * tan::
  459. * tanh::
  460. * column::
  461. * tm_hour::
  462. * tm_mday::
  463. * tm_min::
  464. * tm_mon::
  465. * tm_sec::
  466. * tm_wday::
  467. * tm_yday::
  468. * tm_year::
  469. * valid::
  470.  
  471. 
  472. File: gnuplot.info, Node: abs, Prev: Functions, Up: Functions, Next: acos
  473.  
  474.  The `abs` function returns the absolute value of its argument.  The returned
  475.  value is of the same type as the argument.
  476.  
  477.  For complex arguments, abs(x) is defined as the length of x in the complex
  478.  plane [i.e.,  sqrt(real(x)**2 + imag(x)**2) ].
  479.  
  480. 
  481. File: gnuplot.info, Node: acos, Prev: abs, Up: Functions, Next: acosh
  482.  
  483.  The `acos` function returns the arc cosine (inverse cosine) of its argument.
  484.  `acos` returns its argument in radians or degrees, as selected by `set
  485.  angles`.
  486.  
  487. 
  488. File: gnuplot.info, Node: acosh, Prev: acos, Up: Functions, Next: arg
  489.  
  490.  The `acosh` function returns the inverse hyperbolic cosine of its argument in
  491.  radians.
  492.  
  493. 
  494. File: gnuplot.info, Node: arg, Prev: acosh, Up: Functions, Next: asin
  495.  
  496.  The `arg` function returns the phase of a complex number in radians or
  497.  degrees, as selected by `set angles` (*note angles:: ).
  498.  
  499.  
  500. 
  501. File: gnuplot.info, Node: asin, Prev: arg, Up: Functions, Next: asinh
  502.  
  503.  The `asin` function returns the arc sin (inverse sin) of its argument.
  504.  `asin` returns its argument in radians or degrees, as selected by `set
  505.  angles`.
  506.  
  507. 
  508. File: gnuplot.info, Node: asinh, Prev: asin, Up: Functions, Next: atan
  509.  
  510.  The `asinh` function returns the inverse hyperbolic sin of its argument in
  511.  radians.
  512.  
  513. 
  514. File: gnuplot.info, Node: atan, Prev: asinh, Up: Functions, Next: atan2
  515.  
  516.  The `atan` function returns the arc tangent (inverse tangent) of its
  517.  argument.  `atan` returns its argument in radians or degrees, as selected by
  518.  `set angles` (*note angles:: ).
  519.  
  520.  
  521. 
  522. File: gnuplot.info, Node: atan2, Prev: atan, Up: Functions, Next: atanh
  523.  
  524.  The `atan2` function returns the arc tangent (inverse tangent) of the ratio
  525.  of the real parts of its arguments.  `atan2` returns its argument in radians
  526.  or degrees, as selected by `set angles` (*note angles:: ), in the correct
  527.  quadrant.
  528.  
  529.  
  530. 
  531. File: gnuplot.info, Node: atanh, Prev: atan2, Up: Functions, Next: besj0
  532.  
  533.  The `atanh` function returns the inverse hyperbolic tangent of its argument
  534.  in radians.
  535.  
  536. 
  537. File: gnuplot.info, Node: besj0, Prev: atanh, Up: Functions, Next: besj1
  538.  
  539.  The `besj0` function returns the j0th Bessel function of its argument.
  540.  `besj0` expects its argument to be in radians.
  541.  
  542. 
  543. File: gnuplot.info, Node: besj1, Prev: besj0, Up: Functions, Next: besy0
  544.  
  545.  The `besj1` function returns the j1st Bessel function of its argument.
  546.  `besj1` expects its argument to be in radians.
  547.  
  548. 
  549. File: gnuplot.info, Node: besy0, Prev: besj1, Up: Functions, Next: besy1
  550.  
  551.  The `besy0` function returns the y0th Bessel function of its argument.
  552.  `besy0` expects its argument to be in radians.
  553.  
  554. 
  555. File: gnuplot.info, Node: besy1, Prev: besy0, Up: Functions, Next: ceil
  556.  
  557.  The `besy1` function returns the y1st Bessel function of its argument.
  558.  `besy1` expects its argument to be in radians.
  559.  
  560. 
  561. File: gnuplot.info, Node: ceil, Prev: besy1, Up: Functions, Next: cos
  562.  
  563.  The `ceil` function returns the smallest integer that is not less than its
  564.  argument.  For complex numbers, `ceil` returns the smallest integer not less
  565.  than the real part of its argument.
  566.  
  567. 
  568. File: gnuplot.info, Node: cos, Prev: ceil, Up: Functions, Next: cosh
  569.  
  570.  The `cos` function returns the cosine of its argument.  `cos` accepts its
  571.  argument in radians or degrees, as selected by `set angles`
  572.  (*note angles:: ).
  573.  
  574.  
  575. 
  576. File: gnuplot.info, Node: cosh, Prev: cos, Up: Functions, Next: erf
  577.  
  578.  The `cosh` function returns the hyperbolic cosine of its argument.  `cosh`
  579.  expects its argument to be in radians.
  580.  
  581. 
  582. File: gnuplot.info, Node: erf, Prev: cosh, Up: Functions, Next: erfc
  583.  
  584.  The `erf` function returns the error function of the real part of its
  585.  argument.  If the argument is a complex value, the imaginary component is
  586.  ignored.
  587.  
  588. 
  589. File: gnuplot.info, Node: erfc, Prev: erf, Up: Functions, Next: exp
  590.  
  591.  The `erfc` function returns 1.0 - the error function of the real part of its
  592.  argument.  If the argument is a complex value, the imaginary component is
  593.  ignored.
  594.  
  595. 
  596. File: gnuplot.info, Node: exp, Prev: erfc, Up: Functions, Next: floor
  597.  
  598.  The `exp` function returns the exponential function of its argument (`e`
  599.  raised to the power of its argument).  On some implementations (notably
  600.  suns), exp(-x) returns undefined for very large x.  A user-defined function
  601.  like safe(x) = x<-100 ? 0 : exp(x) might prove useful in these cases.
  602.  
  603. 
  604. File: gnuplot.info, Node: floor, Prev: exp, Up: Functions, Next: gamma
  605.  
  606.  The `floor` function returns the largest integer not greater than its
  607.  argument.  For complex numbers, `floor` returns the largest integer not
  608.  greater than the real part of its argument.
  609.  
  610. 
  611. File: gnuplot.info, Node: gamma, Prev: floor, Up: Functions, Next: ibeta
  612.  
  613.  The `gamma` function returns the gamma function of the real part of its
  614.  argument.  For integer n, gamma(n+1) = n!.  If the argument is a complex
  615.  value, the imaginary component is ignored.
  616.  
  617. 
  618. File: gnuplot.info, Node: ibeta, Prev: gamma, Up: Functions, Next: inverf
  619.  
  620.  The `ibeta` function returns the incomplete beta function of the real parts
  621.  of its arguments. p, q > 0 and x in [0:1].  If the arguments are complex,
  622.  the imaginary components are ignored.
  623.  
  624. 
  625. File: gnuplot.info, Node: inverf, Prev: ibeta, Up: Functions, Next: igamma
  626.  
  627.  The `inverf` function returns the inverse error function of the real part
  628.  of its argument.
  629.  
  630. 
  631. File: gnuplot.info, Node: igamma, Prev: inverf, Up: Functions, Next: imag
  632.  
  633.  The `igamma` function returns the incomplete gamma function of the real
  634.  parts of its arguments.  a > 0 and x >= 0.  If the arguments are complex,
  635.  the imaginary components are ignored.
  636.  
  637. 
  638. File: gnuplot.info, Node: imag, Prev: igamma, Up: Functions, Next: invnorm
  639.  
  640.  The `imag` function returns the imaginary part of its argument as a real
  641.  number.
  642.  
  643. 
  644. File: gnuplot.info, Node: invnorm, Prev: imag, Up: Functions, Next: int
  645.  
  646.  The `invnorm` function returns the inverse normal distribution function of
  647.  the real part of its argument.
  648.  
  649. 
  650. File: gnuplot.info, Node: int, Prev: invnorm, Up: Functions, Next: lgamma
  651.  
  652.  The `int` function returns the integer part of its argument, truncated
  653.  toward zero.
  654.  
  655. 
  656. File: gnuplot.info, Node: lgamma, Prev: int, Up: Functions, Next: log
  657.  
  658.  The `lgamma` function returns the natural logarithm of the gamma function
  659.  of the real part of its argument.  If the argument is a complex value, the
  660.  imaginary component is ignored.
  661.  
  662. 
  663. File: gnuplot.info, Node: log, Prev: lgamma, Up: Functions, Next: log10
  664.  
  665.  The `log` function returns the natural logarithm (base `e`) of its argument.
  666.  
  667. 
  668. File: gnuplot.info, Node: log10, Prev: log, Up: Functions, Next: norm
  669.  
  670.  The `log10` function returns the logarithm (base 10) of its argument.
  671.  
  672. 
  673. File: gnuplot.info, Node: norm, Prev: log10, Up: Functions, Next: rand
  674.  
  675.  The `norm` function returns the normal distribution function (or Gaussian)
  676.  of the real part of its argument.
  677.  
  678. 
  679. File: gnuplot.info, Node: rand, Prev: norm, Up: Functions, Next: real
  680.  
  681.  The `rand` function returns a pseudo random number in the interval [0:1]
  682.  using the real part of its argument as a seed.  If seed < 0, the sequence
  683.  is (re)initialized.  If the argument is a complex value, the imaginary
  684.  component is ignored.
  685.  
  686. 
  687. File: gnuplot.info, Node: real, Prev: rand, Up: Functions, Next: sgn
  688.  
  689.  The `real` function returns the real part of its argument.
  690.  
  691. 
  692. File: gnuplot.info, Node: sgn, Prev: real, Up: Functions, Next: sin
  693.  
  694.  The `sgn` function returns 1 if its argument is positive, -1 if its argument
  695.  is negative, and 0 if its argument is 0.  If the argument is a complex value,
  696.  the imaginary component is ignored.
  697.  
  698. 
  699. File: gnuplot.info, Node: sin, Prev: sgn, Up: Functions, Next: sinh
  700.  
  701.  The `sin` function returns the sine of its argument.  `sin` expects its
  702.  argument to be in radians or degrees, as selected by `set angles`
  703.  (*note angles:: ).
  704.  
  705.  
  706. 
  707. File: gnuplot.info, Node: sinh, Prev: sin, Up: Functions, Next: sqrt
  708.  
  709.  The `sinh` function returns the hyperbolic sine of its argument.  `sinh`
  710.  expects its argument to be in radians.
  711.  
  712. 
  713. File: gnuplot.info, Node: sqrt, Prev: sinh, Up: Functions, Next: tan
  714.  
  715.  The `sqrt` function returns the square root of its argument.
  716.  
  717. 
  718. File: gnuplot.info, Node: tan, Prev: sqrt, Up: Functions, Next: tanh
  719.  
  720.  The `tan` function returns the tangent of its argument.  `tan` expects
  721.  its argument to be in radians or degrees, as selected by `set angles`
  722.  (*note angles:: ).
  723.  
  724.  
  725. 
  726. File: gnuplot.info, Node: tanh, Prev: tan, Up: Functions, Next: column
  727.  
  728.  The `tanh` function returns the hyperbolic tangent of its argument.  `tanh`
  729.  expects its argument to be in radians.
  730.  
  731.  A few additional functions are also available.
  732.  
  733.  
  734. 
  735. File: gnuplot.info, Node: column, Prev: tanh, Up: Functions, Next: tm_hour
  736.  
  737.  `column(x)` may be used only in expressions as part of `using`
  738.  (*note using:: ) manipulations to fits or datafile plots.  See `plot datafile
  739.  using`.
  740.  
  741.  
  742. 
  743. File: gnuplot.info, Node: tm_hour, Prev: column, Up: Functions, Next: tm_mday
  744.  
  745.  The `tm_hour` function interprets its argument as a time, in seconds from
  746.  1 Jan 2000.  It returns the hour (an integer in the range 0--23) as a real.
  747.  
  748. 
  749. File: gnuplot.info, Node: tm_mday, Prev: tm_hour, Up: Functions, Next: tm_min
  750.  
  751.  The `tm_mday` function interprets its argument as a time, in seconds from
  752.  1 Jan 2000.  It returns the day of the month (an integer in the range 1--31)
  753.  as a real.
  754.  
  755. 
  756. File: gnuplot.info, Node: tm_min, Prev: tm_mday, Up: Functions, Next: tm_mon
  757.  
  758.  The `tm_min` function interprets its argument as a time, in seconds from
  759.  1 Jan 2000.  It returns the minute (an integer in the range 0--59) as a real.
  760.  
  761. 
  762. File: gnuplot.info, Node: tm_mon, Prev: tm_min, Up: Functions, Next: tm_sec
  763.  
  764.  The `tm_mon` function interprets its argument as a time, in seconds from
  765.  1 Jan 2000.  It returns the month (an integer in the range 1--12) as a real.
  766.  
  767. 
  768. File: gnuplot.info, Node: tm_sec, Prev: tm_mon, Up: Functions, Next: tm_wday
  769.  
  770.  The `tm_sec` function interprets its argument as a time, in seconds from
  771.  1 Jan 2000.  It returns the second (an integer in the range 0--59) as a real.
  772.  
  773. 
  774. File: gnuplot.info, Node: tm_wday, Prev: tm_sec, Up: Functions, Next: tm_yday
  775.  
  776.  The `tm_wday` function interprets its argument as a time, in seconds from
  777.  1 Jan 2000.  It returns the day of the week (an integer in the range 1--7) as
  778.  a real.
  779.  
  780. 
  781. File: gnuplot.info, Node: tm_yday, Prev: tm_wday, Up: Functions, Next: tm_year
  782.  
  783.  The `tm_yday` function interprets its argument as a time, in seconds from
  784.  1 Jan 2000.  It returns the day of the year (an integer in the range 1--366)
  785.  as a real.
  786.  
  787. 
  788. File: gnuplot.info, Node: tm_year, Prev: tm_yday, Up: Functions, Next: valid
  789.  
  790.  The `tm_year` function interprets its argument as a time, in seconds from
  791.  1 Jan 2000.  It returns the year (an integer) as a real.
  792.  
  793. 
  794. File: gnuplot.info, Node: valid, Prev: tm_year, Up: Functions
  795.  
  796.  `valid(x)` may be used only in expressions as part of `using` (*note using:: )
  797.  manipulations to fits or datafile plots.  See `plot datafile using`.
  798.  
  799.  
  800. 
  801. File: gnuplot.info, Node: Operators, Prev: Functions, Up: Expressions, Next: Unary
  802.  
  803.  The operators in `gnuplot` (*note gnuplot:: ) are the same as the
  804.  corresponding operators in the C programming language, except that all
  805.  operators accept integer, real, and complex arguments, unless otherwise
  806.  noted.  The ** operator (exponentiation) is supported, as in FORTRAN.
  807.  
  808.  Parentheses may be used to change order of evaluation.
  809.  
  810. * Menu:
  811.  
  812. * Unary::
  813. * Binary::
  814. * Ternary::
  815.  
  816. 
  817. File: gnuplot.info, Node: Unary, Prev: Operators, Up: Operators, Next: Binary
  818.  
  819.  The following is a list of all the unary operators and their usages:
  820.  
  821.      Symbol      Example    Explanation
  822.        -           -a          unary minus
  823.        +           +a          unary plus (no-operation)
  824.        ~           ~a        * one's complement
  825.        !           !a        * logical negation
  826.        !           a!        * factorial
  827.        $           $3        * call arg/column during `using` (*note using:: )
  828.  manipulation (*) Starred explanations indicate that the operator requires an
  829.  integer argument.
  830.  
  831.  Operator precedence is the same as in Fortran and C.  As in those languages,
  832.  parentheses may be used to change the order of operation.  Thus -2**2 = -4,
  833.  but (-2)**2 = 4.
  834.  
  835.  The factorial operator returns a real number to allow a greater range.
  836.  
  837. 
  838. File: gnuplot.info, Node: Binary, Prev: Unary, Up: Operators, Next: Ternary
  839.  
  840.  The following is a list of all the binary operators and their usages:
  841.  
  842.      Symbol       Example      Explanation
  843.        **          a**b          exponentiation
  844.        *           a*b           multiplication
  845.        /           a/b           division
  846.        %           a%b         * modulo
  847.        +           a+b           addition
  848.        -           a-b           subtraction
  849.        ==          a==b          equality
  850.        !=          a!=b          inequality
  851.        <           a<b           less than
  852.        <=          a<=b          less than or equal to
  853.        >           a>b           greater than
  854.        >=          a>=b          greater than or equal to
  855.        &           a&b         * bitwise AND
  856.        ^           a^b         * bitwise exclusive OR
  857.        |           a|b         * bitwise inclusive OR
  858.        &&          a&&b        * logical AND
  859.        ||          a||b        * logical OR
  860.  
  861.  (*) Starred explanations indicate that the operator requires integer
  862.  arguments.
  863.  
  864.  Logical AND (&&) and OR (||) short-circuit the way they do in C.  That is,
  865.  the second `&&` operand is not evaluated if the first is false; the second
  866.  `||` operand is not evaluated if the first is true.
  867.  
  868. 
  869. File: gnuplot.info, Node: Ternary, Prev: Binary, Up: Operators
  870.  
  871.  There is a single ternary operator:
  872.  
  873.      Symbol       Example      Explanation
  874.        ?:          a?b:c     ternary operation
  875.  
  876.  The ternary operator behaves as it does in C.  The first argument (a), which
  877.  must be an integer, is evaluated.  If it is true (non-zero), the second
  878.  argument (b) is evaluated and returned; otherwise the third argument (c) is
  879.  evaluated and returned.
  880.  
  881.  The ternary operator is very useful both in constructing piecewise functions
  882.  and in plotting points only when certain conditions are met.
  883.  
  884.  Examples:
  885.  
  886.  Plot a function that is to equal sin(x) for 0 <= x < 1, 1/x for 1 <= x < 2,
  887.  and undefined elsewhere:
  888.        f(x) = 0<=x && x<1 ? sin(x) : 1<=x && x<2 ? 1/x : 1/0
  889.        plot f(x)
  890.  Note that `gnuplot` (*note gnuplot:: ) quietly ignores undefined values, so
  891.  the final branch of the function (1/0) will produce no plottable points.  Note
  892.  also that f(x) will be plotted as a continuous function across the
  893.  discontinuity if a line style is used.  To plot it discontinuously, create
  894.  separate functions for the two pieces.  (Parametric functions are also useful
  895.  for this purpose.)
  896.  
  897.  For data in a file, plot the average of the data in columns 2 and 3 against
  898.  the datum in column 1, but only if the datum in column 4 is non-negative:
  899.  
  900.        plot 'file' using 1:( $4<0 ? 1/0 : ($2+$3)/2 )
  901.  
  902.  Please see `plot data-file using` (*note using:: ) for an explanation of the
  903.  using syntax.
  904.  
  905.  
  906. 
  907. File: gnuplot.info, Node: User-defined, Prev: Operators, Up: Expressions
  908.  
  909.  New user-defined variables and functions of one through five variables may
  910.  be declared and used anywhere, including on the `plot` (*note plot:: ) command
  911.  itself.
  912.  
  913.  User-defined function syntax:
  914.        <func-name>( <dummy1> {,<dummy2>} ... {,<dummy5>} ) = <expression>
  915.  
  916.  where <expression> is defined in terms of <dummy1> through <dummy5>.
  917.  
  918.  User-defined variable syntax:
  919.        <variable-name> = <constant-expression>
  920.  
  921.  Examples:
  922.        w = 2
  923.        q = floor(tan(pi/2 - 0.1))
  924.        f(x) = sin(w*x)
  925.        sinc(x) = sin(pi*x)/(pi*x)
  926.        delta(t) = (t == 0)
  927.        ramp(t) = (t > 0) ? t : 0
  928.        min(a,b) = (a < b) ? a : b
  929.        comb(n,k) = n!/(k!*(n-k)!)
  930.        len3d(x,y,z) = sqrt(x*x+y*y+z*z)
  931.        plot f(x) = sin(x*a), a = 0.2, f(x), a = 0.4, f(x)
  932.  
  933.  Note that the variable `pi` is already defined.  But it is in no way magic;
  934.  you may redefine it to be whatever you like.
  935.  
  936.  Valid names are the same as in most programming languages: they must begin
  937.  with a letter, but subsequent characters may be letters, digits, "$", or "_".
  938.  Note, however, that the `fit` (*note fit:: ) mechanism uses several variables
  939.  with names that begin "FIT_".  It is safest to avoid using such
  940.  names.  "FIT_LIMIT", however, is one that you may wish to redefine.
  941.  
  942.  See `show functions` (*note functions:: ) and  `show variables`
  943.  (*note variables:: ).
  944.  
  945.  
  946. 
  947. File: gnuplot.info, Node: Glossary, Prev: Expressions, Up: gnuplot, Next: Plotting
  948.  
  949.  Throughout this document an attempt has been made to maintain consistency of
  950.  nomenclature.  This cannot be wholly successful because as `gnuplot`
  951.  (*note gnuplot:: ) has evolved over time, certain command and keyword names
  952.  have been adopted that preclude such perfection.  This section contains
  953.  explanations of the way some of these terms are used.
  954.  
  955.  A "page" or "screen" is the entire area addressable by `gnuplot`.  On a
  956.  monitor, it is the full screen; on a plotter, it is a single sheet of
  957.  paper.
  958.  
  959.  A screen may contain one or more "plots".  A plot is defined by an
  960.  abscissa and an ordinate, although these need not actually appear on it, as
  961.  well as the margins and any text written therein.
  962.  
  963.  A plot contains one "graph".  A graph is defined by an abscissa and an
  964.  ordinate, although these need not actually appear on it.
  965.  
  966.  A graph may contain one or more "lines".  A line is a single function or
  967.  data set.  "Line" is also a plotting style.  The word will also be used in
  968.  sense "a line of text".  Presumably the context will always remove the
  969.  ambiguity.
  970.  
  971.  The lines on a graph may have individual names.  These may be listed together
  972.  with a sample of the plotting style used to represent them in the "key",
  973.  sometimes also called the "legend".
  974.  
  975.  The word "title" occurs with multiple meanings in `gnuplot`.  In this
  976.  document, it will always be preceded by the adjective "plot", "line", or
  977.  "key" to differentiate among them.
  978.  
  979.  A graph may have up to four labelled axes.  Various commands have the name of
  980.  an axis built into their names, such as `set xlabel` (*note xlabel:: ).  Other
  981.  commands have one or more axis names as options, such as `set logscale
  982.  xy`.  The names of the four axes for these usages are "x" for the axis along
  983.  the bottom border of the plot, "y" for the left border, "x2" for the top
  984.  border, and "y2" for the right border.  "z" also occurs in commands used with
  985.  3-d plotting.
  986.  
  987.  When discussing data files, the term "record" will be resurrected and used to
  988.  denote a single line in the file, that is, the characters between newline or
  989.  end-of-record characters.  A "point" is the datum on a single record, and a
  990.  "dataline" is a set of points on consecutive records, delimited by blank
  991.  records.
  992.  
  993. 
  994. File: gnuplot.info, Node: Plotting, Prev: Glossary, Up: gnuplot, Next: Start-up
  995.  
  996.  There are three `gnuplot` (*note gnuplot:: ) commands which actually create a
  997.  plot:  `plot` (*note plot:: ), `splot` (*note splot:: ) and  `replot`
  998.  (*note replot:: ).  plot generates 2-d plots, splot generates 3-d plots
  999.  (actually 2-d projections, of course), and `replot` appends its arguments to
  1000.  the previous `plot` or `splot` and executes the modified command.
  1001.  
  1002.  Much of the general information about plotting can be found in the discussion
  1003.  of `plot`; information specific to 3-d can be found in the `splot` section.
  1004.  
  1005.  `plot` operates in either rectangular or polar coordinates -- see `set polar`
  1006.  (*note polar:: ) for details of the latter.  `splot` operates only in
  1007.  rectangular coordinates, but the `set mapping` (*note mapping:: ) command
  1008.  allows for a few other coordinate systems to be treated.  In addition, the
  1009.  `using` (*note using:: ) option allows both plot and splot to treat almost any
  1010.  coordinate system you'd care to define.
  1011.  
  1012.  `splot` can plot surfaces and contours in addition to lines.  See `splot
  1013.  datafile` for information about the requisite file structure for both of
  1014.  these; see `set isosamples` (*note isosamples:: ) for information about
  1015.  defining the grid for a 3-d function.  See `set contour` (*note contour:: )
  1016.  and  `set cntrparam` (*note cntrparam:: ) for information about contours.
  1017.  
  1018.  
  1019. 
  1020. File: gnuplot.info, Node: Start-up, Prev: Plotting, Up: gnuplot, Next: Substitution
  1021.  
  1022.  When `gnuplot` (*note gnuplot:: ) is run, it looks for an initialization file
  1023.  to load.  This file is called `.gnuplot` on Unix and AmigaDOS systems, and
  1024.  `GNUPLOT.INI` on other systems.  If this file is not found in the current
  1025.  directory, the program will look for it in the home directory (under
  1026.  AmigaDOS, Atari(single)TOS, MS-DOS and OS/2, the environment variable
  1027.  `gnuplot` should contain the name of this directory).  Note: if NOCWDRC is
  1028.  defined during the installation, `gnuplot` will not read from the current
  1029.  directory.
  1030.  
  1031.  If the initialization file is found, `gnuplot` executes the commands in it.
  1032.  These may be any legal `gnuplot` commands, but typically they are limited to
  1033.  setting the terminal and defining frequently-used functions or variables.
  1034.  
  1035. 
  1036. File: gnuplot.info, Node: Substitution, Prev: Start-up, Up: gnuplot, Next: Syntax
  1037.  
  1038.  Command-line substitution is specified by a system command enclosed in
  1039.  backquotes.  This command is spawned and the output it produces replaces
  1040.  the name of the command (and backquotes) on the command line.
  1041.  
  1042.  Newlines in the output produced by the spawned command are replaced with
  1043.  blanks.
  1044.  
  1045.  Command-line substitution can be used anywhere on the `gnuplot`
  1046.  (*note gnuplot:: ) command line.
  1047.  
  1048.  Example:
  1049.  
  1050.  This will run the program `leastsq` and replace `leastsq` (including
  1051.  backquotes) on the command line with its output:
  1052.        f(x) = `leastsq`
  1053.  
  1054.  or, in VMS
  1055.        f(x) = `run leastsq`
  1056.  
  1057. 
  1058. File: gnuplot.info, Node: Syntax, Prev: Substitution, Up: gnuplot, Next: Time/Date data
  1059.  
  1060.  The general rules of syntax and punctuation in `gnuplot` (*note gnuplot:: )
  1061.  are that keywords and options are order-dependent.  Options and any
  1062.  accompanying parameters are separated by spaces whereas lists and coordinates
  1063.  are separated by commas. Ranges are separated by colons and enclosed in braces
  1064.  [], text and file names are enclosed in quotes, and a few miscellaneous things
  1065.  are enclosed in parentheses.  Brackets {} are used for a few special
  1066.  purposes.
  1067.  
  1068.  Commas are used to separate coordinates on the `set` (*note set-show:: )
  1069.  commands  `arrow` (*note arrow:: ), `key` (*note key:: ), and  `label`
  1070.  (*note label:: ); the list of variables being fitted (the list after the `via`
  1071.  keyword on the `fit` (*note fit:: ) command); lists of discrete contours or
  1072.  the loop parameters which specify them on the `set cntrparam`
  1073.  (*note cntrparam:: ) command; the arguments of the `set` commands `dgrid3d`
  1074.  (*note dgrid3d:: ),  `dummy` (*note dummy:: ),  `isosamples`
  1075.  (*note isosamples:: ),  `offsets` (*note offsets:: ),  `origin`
  1076.  (*note origin:: ), `samples` (*note samples:: ),  `size` (*note size:: ),
  1077.  time, and nd `view` (*note view:: ); lists of tics or the loop parameters
  1078.  which specify them; the offsets for titles and axis labels; parametric
  1079.  functions to be used to calculate the x, y, and z coordinates on the `plot`
  1080.  (*note plot:: ), `replot` (*note replot:: ) and  `splot` (*note splot:: )
  1081.  commands; and the complete sets of keywords specifying individual plots (data
  1082.  sets or functions) on the `plot`, `replot` and `splot` commands.
  1083.  
  1084.  Parentheses are used to delimit sets of explicit tics (as opposed to loop
  1085.  parameters) and to indicate computations in the `using` (*note using:: )
  1086.  filter of the fit, `plot`, `replot` and `splot` commands.
  1087.  
  1088.  (Parentheses and commas are also used as usual in function notation.)
  1089.  
  1090.  Braces are used to delimit ranges, whether they are given on `set`, `plot` or
  1091.  `splot` commands.
  1092.  
  1093.  Colons are used to separate extrema in `range` specifications (whether they
  1094.  are given on `set`, `plot` or `splot` commands) and to separate entries in
  1095.  the `using` filter of the `plot`, `replot`, `splot` and `fit` commands.
  1096.  
  1097.  Semicolons are used to separate commands given on a single command line.
  1098.  
  1099.  Brackets are used in text to be specially processed by some terminals, like
  1100.  `postscript` (*note postscript:: ).  They are also used to denote complex
  1101.  numbers: {3,2} = 3 + 2i.
  1102.  
  1103.  Text may be enclosed in single- or double-quotes.  Backslash processing of
  1104.  sequences like \n (newline) and \345 (octal character code) is performed for
  1105.  double-quoted strings, but not for single-quoted strings.
  1106.  
  1107.  The justification is the same for each line of a multi-line string.  Thus the
  1108.  center-justified string
  1109.        "This is the first line of text.\nThis is the second line."
  1110.  will produce
  1111.                         This is the first line of text.
  1112.                            This is the second line.
  1113.  but
  1114.        'This is the first line of text.\nThis is the second line.'
  1115.  will produce
  1116.            This is the first line of text.\nThis is the second line.
  1117.  
  1118.  At present you should not embed \n inside {} when using the enhanced option
  1119.  of the postscript terminal.
  1120.  
  1121.  The EEPIC, Imagen, Uniplex, LaTeX, and TPIC drivers allow a newline to be
  1122.  specified by \\ in a single-quoted string or \\\\ in a double-quoted string.
  1123.  
  1124.  Back-quotes are used to enclose system commands for substitution.
  1125.  
  1126. 
  1127. File: gnuplot.info, Node: Time/Date data, Prev: Syntax, Up: gnuplot
  1128.  
  1129.  `gnuplot` (*note gnuplot:: ) supports the use of time and/or date information
  1130.  as input data. This feature is activated by the commands `set xdata time`,
  1131.  `set ydata time`, etc.
  1132.  
  1133.  Internally all times and dates are converted to the number of seconds from
  1134.  the year 2000.  The command `set timefmt` (*note timefmt:: ) defines the
  1135.  format for all inputs: data files, ranges, tics, label positions---in short,
  1136.  anything that accepts a data value must receive it in this format.  Since only
  1137.  one input format can be in force at a given time, all time/date quantities
  1138.  being input at the same time must be presented in the same format.  Thus if
  1139.  both x and y data in a file are time/date, they must be in the same format.
  1140.  
  1141.  Commands like `show xrange` (*note xrange:: ) will re-interpret the integer
  1142.  according to `timefmt`.  If you change `timefmt`, and then `show`
  1143.  (*note set-show:: ) the quantity again, it will be displayed in the new
  1144.  `timefmt`.  For that matter, if you give the deactivation command (like `set
  1145.  xdata` (*note xdata:: )), the quantity will be shown in its numerical form.
  1146.  
  1147.  The command `set format` (*note format:: ) defines the format that will be
  1148.  used for tic labels, whether or not the specified axis is time/date.
  1149.  
  1150.  If time/date information is to be plotted from a file, the `using`
  1151.  (*note using:: ) option _must_ be used on the `plot` (*note plot:: ) or
  1152.   `splot` (*note splot:: ) command.  These commands simply use white space to
  1153.  separate columns, but white space may be embedded within the time/date
  1154.  string.  If you use tabs as a separator, some trial-and-error may be necessary
  1155.  to discover how your system treats them.
  1156.  
  1157.  The following example demonstrates time/date plotting.
  1158.  
  1159.  Suppose the file "data" contains records like
  1160.  
  1161.        03/21/95 10:00  6.02e23
  1162.  
  1163.  This file can be plotted by
  1164.  
  1165.        set xdata time
  1166.        set timefmt "%m/%d"
  1167.        set xrange ["03/21":"03/22"]
  1168.        set format x "%m/%d"
  1169.        set timefmt "%m/%d/%y %H:%M"
  1170.        plot "data" using 1:3
  1171.  
  1172.  which will produce xtic labels that look like "03/21".
  1173.  
  1174.  See the descriptions of each command for more details.
  1175.  
  1176. 
  1177. File: gnuplot.info, Node: Commands, Prev: gnuplot, Up: Top, Next: cd
  1178.  
  1179.  
  1180. * Menu:
  1181.  
  1182. * cd::
  1183. * call::
  1184. * clear::
  1185. * exit::
  1186. * fit::
  1187. * help::
  1188. * if::
  1189. * load::
  1190. * pause::
  1191. * plot::
  1192. * print::
  1193. * pwd::
  1194. * quit::
  1195. * replot::
  1196. * reread::
  1197. * reset::
  1198. * save::
  1199. * set-show::
  1200. * shell::
  1201. * splot::
  1202. * test::
  1203. * update::
  1204.  
  1205. 
  1206. File: gnuplot.info, Node: cd, Prev: Commands, Up: Commands, Next: call
  1207.  
  1208.  The `cd` command changes the working directory.
  1209.  
  1210.  Syntax:
  1211.        cd '<directory-name>'
  1212.  
  1213.  The directory name must be enclosed in quotes.
  1214.  
  1215.  Examples:
  1216.        cd 'subdir'
  1217.        cd ".."
  1218.  
  1219.  DOS users _must_ use single-quotes---backslash [\] has special significance
  1220.  inside double-quotes.  For example,
  1221.        cd "c:\newdata"
  1222.  fails, but
  1223.        cd 'c:\newdata'
  1224.  works as expected.
  1225.  
  1226. 
  1227. File: gnuplot.info, Node: call, Prev: cd, Up: Commands, Next: clear
  1228.  
  1229.  The `call` command is identical to the load command with one exception: you
  1230.  can have up to ten additional parameters to the command (delimited according
  1231.  to the standard parser rules) which can be substituted into the lines read
  1232.  from the file.  As each line is read from the `call`ed input file, it is
  1233.  scanned for the sequence `$` (dollar-sign) followed by a digit (0--9).  If
  1234.  found, the sequence is replaced by the corresponding parameter from the
  1235.  `call` command line.  If the parameter was specified as a string in the
  1236.  `call` line, it is substituted without its enclosing quotes.  `$` followed by
  1237.  any character other than a digit will be that character.  E.g. use `$$` to
  1238.  get a single `$`.  Providing more than ten parameters on the `call` command
  1239.  line will cause an error.  A parameter that was not provided substitutes as
  1240.  nothing.  Files being `call`ed may themselves contain `call` or `load`
  1241.  (*note load:: ) commands.
  1242.  
  1243.  The `call` command _must_ be the last command on a multi-command line.
  1244.  
  1245.  Syntax:
  1246.        call "<input-file>" <parameter-0> <parm-1> ... <parm-9>
  1247.  
  1248.  The name of the input file must be enclosed in quotes, and it is recommended
  1249.  that parameters are similarly enclosed in quotes (future versions of gnuplot
  1250.  may treat quoted and unquoted arguments differently).
  1251.  
  1252.  Example:
  1253.  
  1254.  If the file 'calltest.gp' contains the line:
  1255.        print "p0=$0 p1=$1 p2=$2 p3=$3 p4=$4 p5=$5 p6=$6 p7=x$7x"
  1256.  
  1257.  entering the command:
  1258.        call 'calltest.gp' "abcd" 1.2 + "'quoted'" -- "$2"
  1259.  
  1260.  will display:
  1261.        p0=abcd p1=1.2 p2=+ p3='quoted' p4=- p5=- p6=$2 p7=xx
  1262.  
  1263.  NOTE: there is a clash in syntax with the datafile `using` (*note using:: )
  1264.  callback operator.  Use `$$n` or `column(n)` to access column n from a
  1265.  datafile inside a `call`ed datafile plot.
  1266.  
  1267.  
  1268. 
  1269. File: gnuplot.info, Node: clear, Prev: call, Up: Commands, Next: exit
  1270.  
  1271.  The `clear` command erases the current screen or output device as specified
  1272.  by `set output` (*note output:: ).  This usually generates a formfeed on
  1273.  hardcopy devices.  Use `set terminal` (*note terminal:: ) to set the device
  1274.  type.
  1275.  
  1276.  For some terminals `clear` erases only the portion of the plotting surface
  1277.  defined by `set size` (*note size:: ), so for these it can be used in
  1278.  conjunction with set multiplot` to create an inset.
  1279.  
  1280.  Example:
  1281.        set multiplot
  1282.        plot sin(x)
  1283.        set origin 0.5,0.5
  1284.        set size 0.4,0.4
  1285.        clear
  1286.        plot cos(x)
  1287.        set nomultiplot
  1288.  
  1289.  Please see `set multiplot` (*note multiplot:: ), set size, and nd `set origin`
  1290.  (*note origin:: ) for details of these commands.
  1291.  
  1292.  
  1293. 
  1294. File: gnuplot.info, Node: exit, Prev: clear, Up: Commands, Next: fit
  1295.  
  1296.  The commands `exit` and `quit` (*note quit:: ) and the END-OF-FILE character
  1297.  will exit `gnuplot` (*note gnuplot:: ).  Each of these commands will clear the
  1298.  output device (as does the `clear` (*note clear:: ) command) before exiting.
  1299.  
  1300.  
  1301. 
  1302. File: gnuplot.info, Node: fit, Prev: exit, Up: Commands, Next: Introduction To Fitting
  1303.  
  1304.  This implementation incorporates the capability of nonlinear least squares
  1305.  fitting using the Marquardt-Levenberg Algorithm.  It may fit any user-defined
  1306.  function to any set of data points (x,y) or (x,y,z).  x, y, z and the
  1307.  function's return type _must_ be real!  Any variable occurring in the
  1308.  function body may serve as a fit parameter (fitting functions without
  1309.  adjustable parameters make no sense).
  1310.  
  1311.  Syntax:
  1312.        fit {[xrange]} {[yrange]} <function>
  1313.            '<datafile>' {datafile-modifiers}
  1314.             via {'<parameter file>' | <var1>,<var2>,...}
  1315.  
  1316.  Notice that `via` is now a required keyword, to distinguish it from a 'scanf'
  1317.  format string.
  1318.  
  1319.  [xrange] and [yrange] are of the form [{variable=}{<min>}{:<max>}], allowing
  1320.  the range of the fit to be limited temporarily in a manner analogous to
  1321.  `plot` (*note plot:: ).  <function> is any valid  `gnuplot` (*note gnuplot:: )
  1322.  expression, although it is usual to use a previously user-defined function of
  1323.  the form f(x) or f(x,y). <datafile> is treated as in the `plot` command.  All
  1324.  the modifiers for datafiles (`using` (*note using:: ),  `every`
  1325.  (*note every:: ),...) in plot are available here (except `smooth`
  1326.  (*note smooth:: ))---see  `plot datafile` (*note data-file:: ) for full
  1327.  details.  The default columns for x and y are 1 and 2.  These may be changed
  1328.  by the `using x:y` mechanism.  If `using` has a third entry (a column or an
  1329.  expression), it will be interpreted as the standard deviation of each y value
  1330.  and will be used to compute the weight; otherwise all data will be weighted
  1331.  equally.  If four columns are specified, they are x:y:z:error---note that an
  1332.  error _must_ be specified in order to perform a 3-d fit.  If errors are not
  1333.  available, a constant value can be specified, e.g., `using ...:(1)`.
  1334.  
  1335.  Initial values for the parameters to be fit may be specified in a (load-)file
  1336.  wherein each line is of the form:
  1337.  
  1338.        varname = value
  1339.  
  1340.  Comments, marked by '#', and blank lines are permissible.  The special form
  1341.  
  1342.        varname = value       # FIXED
  1343.  
  1344.  means that the variable is treated as a `fixed parameter` that is initialized
  1345.  but will not be adjusted.  It is not necessary (but sometimes useful for
  1346.  clarity) to specify them at all.  The keyword `# FIXED` has to appear in
  1347.  exactly this form.
  1348.  
  1349.  The other means of specifying the adjustable parameters is to provide a
  1350.  comma-separated list of variable names after the `via` keyword.  If any of
  1351.  these variables do not yet exist within the current `gnuplot` session, they
  1352.  are created with an initial value of 1.0, but the fit is more likely to
  1353.  converge if a more appropriate starting value is given.  If this form is
  1354.  used, it may prove beneficial to iterate the fit, allowing only one or two
  1355.  variables to be adjusted at a time until a reasonably close fit is obtained,
  1356.  before allowing `fit` to vary all parameters.
  1357.  
  1358.  After each iteration step, detailed information is given about the fit's
  1359.  state, both on the screen and on a logfile "fit.log".  This file will never be
  1360.  erased but always appended to so that the fit's history isn't lost.  After
  1361.  each iteration step, the fit may be interrupted by pressing Ctrl-C (any key
  1362.  _but_ Ctrl-C under MSDOS and Atari Multitasking Systems).  Then you have the
  1363.  options of stopping (and accepting the current parameter values), continuing
  1364.  the iteration of the fit, or executing a `gnuplot` command specified by an
  1365.  environment variable FIT_SCRIPT.  A `plot` or `load` (*note load:: ) command
  1366.  may be useful in this context.
  1367.  
  1368.  Special `gnuplot` variables:
  1369.  
  1370.        FIT_LIMIT
  1371.  may be specified to change the default epsilon limit (1e-5).  When the sum
  1372.  of squared residuals changes between two iteration steps by less than a
  1373.  factor of this number, the fit is considered to have 'converged'.
  1374.  
  1375.  Once the fit is converged, the final values may be stored in (load-)file
  1376.  suitable for use as an initial-value file, as discussed above.  Please see
  1377.  `update` (*note update:: ) for details.
  1378.  
  1379.        FIT_MAXITER
  1380.  may be specified to limit the number of iterations performed without
  1381.  convergence by FIT_LIMIT.  A value of 0 (or not defining it at all) means
  1382.  that there is no limit.
  1383.  
  1384.  [FIT_SKIP was available in previous releases of gnufit.  Its functionality
  1385.  is now obtained using the `every` modifier for datafiles.  FIT_INDEX was
  1386.  previously available in order to allow multi-branch fitting.  Multi-branch
  1387.  fitting in 2-d can now be done as a pseudo-3-d fit in which the y values are
  1388.  the dataline number (`using 1:-1:...`) or index (`using 1:-2:...`).]
  1389.  
  1390.  Environment variables:
  1391.  
  1392.        FIT_LOG
  1393.  changes the logfile's path from './fit.log' (write permission is necessary).
  1394.  
  1395.        FIT_SCRIPT
  1396.  specifies a command to be executed after an user interrupt.
  1397.  
  1398.  Examples:
  1399.        f(x) = a*x**2 + b*x + c
  1400.        FIT_LIMIT = 1e-6
  1401.        fit f(x) 'measured.dat' via 'start.par'
  1402.        fit f(x) 'measured.dat' using 3:($7-5) via 'start.par'
  1403.        fit f(x) './data/trash.dat' using 1:2:3 via a, b, c
  1404.        fit f(x,y) 'surface.dat' using 1:2:3:(1) via a, b, c
  1405.  
  1406. * Menu:
  1407.  
  1408. * Introduction To Fitting::
  1409. * Errors In Fitting::
  1410. * Tips and Tricks::
  1411.  
  1412. 
  1413. File: gnuplot.info, Node: Introduction To Fitting, Prev: fit, Up: fit, Next: Errors In Fitting
  1414.  
  1415.  Beginner's guide to fitting in general
  1416.  
  1417.  `fit` (*note fit:: ) is used to find a set of parameters to be used in a
  1418.  parametric function to make it fit to your data optimally.  The quantity to be
  1419.  minimized is the sum of squared differences between your input data points and
  1420.  the function values at the same places, usually called 'chisquared' (i.e. the
  1421.  Greek letter chi, to the power of 2).  (To be precise, the differences will be
  1422.  divided by the input data errors before being squared; see `fit errors`
  1423.  (*note Errors In Fitting:: ) for details.)
  1424.  
  1425.  Now that you know why it's called 'least squares fitting', let's see why it's
  1426.  'nonlinear'.  That's because the function's dependence on the parameters (not
  1427.  the data!) may be non-linear.  Of course, this might not tell you much if you
  1428.  didn't know already, so let me try to describe it.  If the fitting problem
  1429.  were to be linear, the target function would have to be a sum of simple,
  1430.  non-parametric functions, each multiplied by one parameter.  (For example,
  1431.  consider the function f(x) = c*sin(x), where we want to find the best value
  1432.  for the constant c.  This is nonlinear in x, of course, but it is linear in
  1433.  c.  Since the fitting procedure solves for c, it has a linear equation to
  1434.  solve.)  For such a linear case, the task of fitting can be performed by
  1435.  comparatively simple linear algebra in one direct step.  But `fit` can do
  1436.  more for you:  the parameters may be used in your function in any way you can
  1437.  imagine.  To handle this more general case, however, it has to perform an
  1438.  iteration, i.e. it will repeat a sequence of steps until it finds the fit to
  1439.  have 'converged', or until you stop it.
  1440.  
  1441.  Generally, the function to be fitted will come from some kind of theory (some
  1442.  prefer the term 'model' here) that makes a prediction about how the data
  1443.  should behave, and `fit` is then used to find the free parameters of the
  1444.  theory.  This is a typical task in scientific work, where you have lots of
  1445.  data that depend in more or less complicated ways on the values you're
  1446.  interested in.  The results will then usually be of the form 'the measured
  1447.  data can be described by the {foo} theory, for the following set of
  1448.  parameters', and then a set of values is given, together with the errors of
  1449.  your determination of these values.
  1450.  
  1451.  This reasoning implies that `fit` is probably _not_ your tool of choice if
  1452.  all you really want is a smooth line through your data points.  If you want
  1453.  this, the `smooth` (*note smooth:: ) option to  `plot` (*note plot:: ) is what
  1454.  you've been looking for, not `fit`.  See `plot datafile smooth` for details.
  1455.  
  1456.  
  1457. 
  1458. File: gnuplot.info, Node: Errors In Fitting, Prev: Introduction To Fitting, Up: fit, Next: Tips and Tricks
  1459.  
  1460.  One of the most important things to keep in mind when using `fit`
  1461.  (*note fit:: ) is the handling of errors.  Here, this term refers to the
  1462.  measurement errors accompanying both your input data and resulting
  1463.  parameters.
  1464.  
  1465.  The reason for the importance of input data errors to fitting is that
  1466.  normally the single measurements aren't all of the same quality, so they
  1467.  shouldn't have the same importance in determining the results.  That's one
  1468.  major reason for dividing the differences between data and function by the
  1469.  input errors, also known as 'weighting', in the computation of chisquared.
  1470.  
  1471.  By weighting, deviations from your function at places where the data have
  1472.  large errors will have a smaller part in chisquared, as the division will
  1473.  make them smaller compared to the better measurements.  Another reason for
  1474.  the division is that, for mathematical reasons, chisquared has to be a
  1475.  dimensionless variable, i.e. chisquared should be something like '15.3', not
  1476.  '15.3 square seconds'.
  1477.  
  1478.  Without input data errors being given, all data will be weighted equally, and
  1479.  the resulting errors of the parameters won't have much of a real meaning.
  1480.  Therefore, you should always try to find a sensible set of y-errors for your
  1481.  data.  An important example is that of data representing a histogram.  In
  1482.  such a case, the square root of the y value is often the correct input error
  1483.  to use.
  1484.  
  1485.  Once the fit iteration has stopped, it will display a load of valuable
  1486.  information which you will have to learn to interpret before you can use it.
  1487.  The 'sum of squares residuals' is the distance between the data and your fit
  1488.  function, shortly called 'chisquared'.  This is what `fit` tries to minimize.
  1489.  To quickly test if your fit went well, check that this is about the same as
  1490.  the number of data points minus the number of parameters (all this is only
  1491.  valid if you supplied y-errors, and the number of data points is large
  1492.  enough).  For details on this, look up the 'Chi-squared distribution' in your
  1493.  favourite statistics textbook.
  1494.  
  1495.  If chisquared is much larger than that, then your function didn't fit the
  1496.  data very well.  Try another, more general one, or allow more of the
  1497.  parameters to be adjusted by `fit`.  Another possible reason could be that
  1498.  the y-errors you supplied were a bit optimistic, i.e. too small.
  1499.  
  1500.  If, on the other hand, chisquared is too small, then the function fit the
  1501.  data _too_ well.  Either the given y-errors were too large, or the function
  1502.  is too general.  You should try to restrict it by either fixing some
  1503.  parameters, or just make it simpler one way or the other.
  1504.  
  1505.  If all else went well, you'll see a list of the resulting parameter values,
  1506.  together with estimates of the errors of these values.  And you should
  1507.  always be aware of this:  they're _estimates_, not more.  You'll have to get
  1508.  used to both `fit` and kind of problems you usually apply it to before you
  1509.  can use these errors for anything serious.  To start with, the errors
  1510.  reported by `fit` are insensitive to the global scale of the y-errors, i.e.
  1511.  if you multiply all y-errors by a constant, the resulting parameter errors
  1512.  don't change.
  1513.  
  1514.  And, to repeat this once more: if you didn't supply y-errors, the parameter
  1515.  errors will normally be meaningless.
  1516.  
  1517.  
  1518. 
  1519. File: gnuplot.info, Node: Tips and Tricks, Prev: Errors In Fitting, Up: fit
  1520.  
  1521.  Here are some tips to keep in mind to get the most out of `fit`
  1522.  (*note fit:: ).  They're not very organized, so you'll have to read them
  1523.  several times until their essence has sunk in.
  1524.  
  1525.  The two forms of the `via` argument to `fit` serve two largely distinct
  1526.  purposes.  The `via "file"` form is best used for batch operation (possibly
  1527.  unattended), where you just supply the startup values in a file and perhaps
  1528.  later use `update` (*note update:: ) to copy the results back into another
  1529.  file (or the same one).
  1530.  
  1531.  The `via var1, var2, ...` form is best used interactively.  Using the command
  1532.  history mechanism built into gnuplot, you can easily edit the list of
  1533.  parameters to be fitted or supply new startup values for the next try.  This
  1534.  is particularly useful for hard problems, where a direct fit to all the
  1535.  parameters at once won't work, at least not without really _good_ values to
  1536.  start with.  To find such a set of good starting parameters, you can iterate
  1537.  several times, fitting only some of the parameters each time, until the
  1538.  values are close enough to the goal that the final fit (to all the
  1539.  parameters at once) will work.
  1540.  
  1541.  A general word about starting values:  `fit` may, and often will, get really
  1542.  badly lost in searching for the optimal parameter set if you start it way off
  1543.  any possible solution.  The main reason for this is that nonlinear fitting is
  1544.  not guaranteed to converge to a global optimum.  It can get stuck in a local
  1545.  optimum, and there's no way for the routine to find out about that.  You'll
  1546.  have to use your own judgement in checking whether this has happened to you
  1547.  or not.
  1548.  
  1549.  To partly avoid that problem, you should put all starting values at least
  1550.  roughly into the vicinity of the solution.  At least the order of magnitude
  1551.  should be correct, if possible.  The better your starting values are, the
  1552.  less error-prone the fit.  A good way to find starting values is to draw data
  1553.  and fit-function into one plot, and iterate, changing the values and
  1554.  `replot` (*note replot:: )-ting until reasonable similarity is reached.  The
  1555.  same plot is also useful to check if the fit got stuck in a non-global
  1556.  minimum.
  1557.  
  1558.  Make sure that there is no mutual dependency among parameters of the function
  1559.  you are fitting.  E.g., don't try to fit a*exp(x+b), because a*exp(x+b) =
  1560.  a*exp(b)*exp(x).  Instead, fit either a*exp(x) or exp(x+b).
  1561.  
  1562.  A technical issue:  the parameters must not be too different in magnitude.
  1563.  The larger the quotient of the largest and the smallest absolute parameter
  1564.  values, the slower the fit will converge.  If the quotient is close to or
  1565.  above the inverse of the machine floating point precision, it may take next
  1566.  to forever to converge, or refuse to converge at all.  You'll have to adapt
  1567.  your function to avoid this, e.g. replace 'parameter' by '1e9*parameter' in
  1568.  the function definition, and divide the starting value by 1e9.
  1569.  
  1570.  If you can write your function as a linear combination of simple functions
  1571.  weighted by the parameters to be fitted, by all means do so.  That helps a
  1572.  lot, because the problem is then not nonlinear any more.  It should take only
  1573.  a really small number of iterations to converge on a linear case, maybe even
  1574.  only one.
  1575.  
  1576.  In prescriptions for analysing data from practical experimentation courses,
  1577.  you'll often find descriptions how to first fit your data to some functions,
  1578.  maybe in a multi-step process accounting for several aspects of the
  1579.  underlying theory one by one, and then extract the data you really wanted
  1580.  from the fitting parameters of that function.  With `fit`, this last step can
  1581.  often be eliminated by rewriting the model function to directly use the
  1582.  desired final parameters.  Transforming data can also be avoided quite often,
  1583.  although sometimes at the cost of a harder fit problem.  If you think this
  1584.  contradicts the previous paragraph about keeping the fit function as simple
  1585.  as possible, you're correct.
  1586.  
  1587.  Finally, a nice quote from the manual of another fitting package (fudgit)
  1588.  that kind of summarizes all these issues:  "Nonlinear fitting is an art!"
  1589.  
  1590. 
  1591. File: gnuplot.info, Node: help, Prev: fit, Up: Commands, Next: if
  1592.  
  1593.  The `help` command displays on-line help. To specify information on a
  1594.  particular topic use the syntax:
  1595.  
  1596.        help {<topic>}
  1597.  
  1598.  If <topic> is not specified, a short message is printed about `gnuplot`
  1599.  (*note gnuplot:: ). After help for the requested topic is given, a menu of
  1600.  subtopics is given; help for a subtopic may be requested by typing its name,
  1601.  extending the help request.  After that subtopic has been printed, the request
  1602.  may be extended again or you may go back one level to the previous
  1603.  topic.  Eventually, the `gnuplot` command line will return.
  1604.  
  1605.  If a question mark (?) is given as the topic, the list of topics currently
  1606.  available is printed on the screen.
  1607.  
  1608. 
  1609. File: gnuplot.info, Node: if, Prev: help, Up: Commands, Next: load
  1610.  
  1611.  The `if` command allows commands to be executed conditionally.
  1612.  
  1613.  Syntax:
  1614.        if (<condition>) <command-line>
  1615.  
  1616.  <condition> will be evaluated.  If it is true (non-zero), then the command(s)
  1617.  of the <command-line> will be executed.  If <condition> is false (zero), then
  1618.  the entire <command-line> is ignored.  Note that use of `;` to allow multiple
  1619.  commands on the same line will _not_ end the conditionalized commands.
  1620.  
  1621.  Examples:
  1622.        pi=3
  1623.        if (pi!=acos(-1)) print "?Fixing pi!"; pi=acos(-1); print pi
  1624.  will display:
  1625.        ?Fixing pi!
  1626.        3.14159265358979
  1627.  but
  1628.        if (1==2) print "Never see this"; print "Or this either"
  1629.  will not display anything.
  1630.  
  1631.  See `reread` (*note reread:: ) for an example of how if and reread can be used
  1632.  together to perform a loop.
  1633.  
  1634.  
  1635. 
  1636. File: gnuplot.info, Node: load, Prev: if, Up: Commands, Next: pause
  1637.  
  1638.  The `load` command executes each line of the specified input file as if it
  1639.  had been typed in interactively.  Files created by the `save` (*note save:: )
  1640.  command can later be `load`ed.  Any text file containing valid commands can be
  1641.  created and then executed by the `load` command.  Files being `load`ed may
  1642.  themselves contain `load` or `call` (*note call:: ) commands.  See comment for
  1643.  information about comments in commands.
  1644.  
  1645.  The `load` command _must_ be the last command on a multi-command line.
  1646.  
  1647.  Syntax:
  1648.        load "<input-file>"
  1649.  
  1650.  The name of the input file must be enclosed in quotes.
  1651.  
  1652.  Examples:
  1653.        load 'work.gnu'
  1654.        load "func.dat"
  1655.  
  1656.  The `load` command is performed implicitly on any file names given as
  1657.  arguments to `gnuplot` (*note gnuplot:: ).  These are loaded in the order
  1658.  specified, and then `gnuplot` exits.  See also `call`.
  1659.  
  1660.  
  1661. 
  1662. File: gnuplot.info, Node: pause, Prev: load, Up: Commands, Next: plot
  1663.  
  1664.  The `pause` command displays any text associated with the command and then
  1665.  waits a specified amount of time or until the carriage return is pressed.
  1666.  `pause` is especially useful in conjunction with `load` (*note load:: )
  1667.  files.
  1668.  
  1669.  Syntax:
  1670.        pause <time> {"<string>"}
  1671.  
  1672.  <time> may be any integer constant or expression.  Choosing -1 will wait
  1673.  until a carriage return is hit, zero (0) won't pause at all, and a positive
  1674.  integer will wait the specified number of seconds.  `pause 0` is synonymous
  1675.  with `print` (*note print:: ).
  1676.  
  1677.  Note: Since `pause` communicates with the operating system rather than the
  1678.  graphics, it may behave differently with different device drivers (depending
  1679.  upon how text and graphics are mixed).
  1680.  
  1681.  Examples:
  1682.        pause -1    # Wait until a carriage return is hit
  1683.        pause 3     # Wait three seconds
  1684.        pause -1  "Hit return to continue"
  1685.        pause 10  "Isn't this pretty?  It's a cubic spline."
  1686.  
  1687.  
  1688. 
  1689. File: gnuplot.info, Node: plot, Prev: pause, Up: Commands, Next: data-file
  1690.  
  1691.  `plot` is the primary command for drawing plots with `gnuplot`
  1692.  (*note gnuplot:: ).  It creates plots of functions and data in many, many
  1693.  ways.  `plot` is used to draw 2-d functions and data; `splot` (*note splot:: )
  1694.  draws 2-d projections of 3-d surfaces and data. `plot` and `splot` contain
  1695.  many common features; see `splot` for differences.
  1696.  
  1697.  Syntax:
  1698.        plot {<ranges>}
  1699.             {<function> | {"<datafile>" {datafile-modifiers}}}
  1700.             {axes <axes>} {<title-spec>} {with <style>}
  1701.             {, {definitions,} <function> ...}
  1702.  
  1703.  where either a <function> or the name of a data file enclosed in quotes is
  1704.  supplied.  A function is a mathematical expression or a pair of mathematical
  1705.  expressions in parametric mode.  The expressions may be defined completely or
  1706.  in part earlier in the stream of `gnuplot` commands (see `user-defined`
  1707.  (*note User-defined:: )).
  1708.  
  1709.  It is also possible to define functions and parameters on the `plot` command
  1710.  itself.  This is done merely by isolating them from other items with commas.
  1711.  
  1712.  There are four possible sets of axes available; the keyword <axes> is used to
  1713.  select the axes for which a particular line should be scaled.  `x1y1` refers
  1714.  to the axes on the bottom and left; `x2y2` to those on the top and right;
  1715.  `x1y2` to those on the bottom and right; and `x2y1` to those on the top and
  1716.  left.  Ranges specified on the `plot` command apply only to the first set of
  1717.  axes (bottom left).
  1718.  
  1719.  Examples:
  1720.        plot sin(x)
  1721.        plot f(x) = sin(x*a), a = .2, f(x), a = .4, f(x)
  1722.        plot [t=1:10] [-pi:pi*2] tan(t), \
  1723.             "data.1" using (tan($2)):($3/$4) smooth csplines \
  1724.                      axes x1y2 notitle with lines 5
  1725.  
  1726.  
  1727. * Menu:
  1728.  
  1729. * data-file::
  1730. * errorbars::
  1731. * parametric::
  1732. * ranges::
  1733. * title::
  1734. * with::
  1735.  
  1736. 
  1737. File: gnuplot.info, Node: data-file, Prev: plot, Up: plot, Next: every
  1738.  
  1739.  Discrete data contained in a file can be displayed by specifying the name of
  1740.  the data file (enclosed in quotes) on the `plot` (*note plot:: ) or  `splot`
  1741.  (*note splot:: ) command line.
  1742.  
  1743.  Syntax:
  1744.        {s}plot '<file_name>' {index <index list>}
  1745.                              {every <every list>}
  1746.                              {thru <thru expression>}
  1747.                              {using <using list>}
  1748.                              {smooth <option>}
  1749.  
  1750.  The modifiers `index` (*note index:: ),  `every` (*note every:: ),  `thru`
  1751.  (*note thru:: ),  `using` (*note using:: ), and  `smooth` (*note smooth:: )
  1752.  are discussed separately.  In brief, `index` selects which data sets in a
  1753.  multi-data-set file are to be plotted, `every` specifies which points within a
  1754.  single data set are to be plotted, `using` determines how the columns within a
  1755.  single record are to be interpreted (`thru` is a special case of `using`),
  1756.  and `smooth` allows for simple interpolation and approximation.
  1757.  
  1758.  Data files should contain one data point per record.  Records beginning with
  1759.  # (or ! on VMS) will be treated as comments and ignored.  Each data point
  1760.  represents an (x,y) pair.  For `plot`s with error bars (see `set style
  1761.  errorbars`), each data point is (x,y,ydelta), (x,y,ylow,yhigh), (x,y,xdelta),
  1762.  (x,y,xlow,xhigh), or (x,y,xlow,xhigh,ylow,yhigh).  In all cases, the numbers
  1763.  on each record of a data file must be separated by white space (one or more
  1764.  blanks or tabs), unless a format specifier is provided by the `using` option.
  1765.  This white space divides each record into columns.
  1766.  
  1767.  Data may be written in exponential format with the exponent preceded by the
  1768.  letter e, E, d, D, q, or Q.
  1769.  
  1770.  Only one column (the y value) need be provided.  If x is omitted, `gnuplot`
  1771.  (*note gnuplot:: ) provides integer values starting at 0.
  1772.  
  1773.  In datafiles, blank records (records with no characters other than blanks and
  1774.  a newline and/or carriage return) are significant---pairs of blank records
  1775.  separate `index`es (see `plot datafile index`).  Data separated by double
  1776.  blank records are treated as if they were in separate data files.
  1777.  
  1778.  Single blank records designate discontinuities in a `plot`; no line will join
  1779.  points separated by a blank records (if they are plotted with a line style).
  1780.  
  1781.  If autoscaling has been enabled (`set autoscale` (*note autoscale:: )), the
  1782.  axes are automatically extended to include all datapoints, with a whole number
  1783.  of tic marks if tics are being drawn.  This has two consequences: i) For
  1784.  `splot`, the corner of the surface may not coincide with the corner of the
  1785.  base.  In this case, no vertical line is drawn.  ii) When plotting data with
  1786.  the same x range on a dual-axis graph, the x coordinates may not coincide if
  1787.  the x2tics are not being drawn.  This is because the x axis has been
  1788.  autoextended to a whole number of tics, but the x2 axis has not.  The
  1789.  following example illustrates the problem:
  1790.  
  1791.        reset; plot '-', '-'
  1792.        1 1
  1793.        19 19
  1794.        e
  1795.        1 1
  1796.        19 19
  1797.        e
  1798.  
  1799. * Menu:
  1800.  
  1801. * every::
  1802. * example datafile::
  1803. * index::
  1804. * smooth::
  1805. * special-filenames::
  1806. * thru::
  1807. * using::
  1808.  
  1809. 
  1810. File: gnuplot.info, Node: every, Prev: data-file, Up: data-file, Next: example datafile
  1811.  
  1812.  The `every` keyword allows a periodic sampling of a data set to be plotted.
  1813.  
  1814.  In the discussion a "point" is a datum defined by a single record in the
  1815.  file.
  1816.  
  1817.  Syntax:
  1818.        plot 'file' every {<point_incr>}
  1819.                            {:{<line_incr>}
  1820.                              {:{<start_point>}
  1821.                                {:{<start_line>}
  1822.                                  {:{<end_point>}
  1823.                                    {:<end_line>}}}}}
  1824.  
  1825.  The data points to be plotted are selected according to a loop from
  1826.  <`start_point`> to <`end_point`> with increment <`point_incr`> and the
  1827.  datalines according to a loop from <`start_line`> to <`end_line`> with
  1828.  increment <`line_incr`>.
  1829.  
  1830.  The first datum in each dataline is numbered '0', as is the first dataline in
  1831.  the file.
  1832.  
  1833.  Note that records containing unplottable information are counted.
  1834.  
  1835.  Any of the numbers can be omitted; the increments default to unity, the start
  1836.  values to the first point or dataline, and the end values to the last point
  1837.  or dataline.  If `every` is not specified, all points in all datalines are
  1838.  plotted.
  1839.  
  1840.  Examples:
  1841.        every :::3::3    # selects just the fourth dataline ('0' is first)
  1842.        every :::::9     # selects the first 10 datalines
  1843.        every 2:2        # selects every other point in every other dataline
  1844.        every ::5::15    # selects points 5 through 15 in each dataline
  1845.  
  1846. 
  1847. File: gnuplot.info, Node: example datafile, Prev: every, Up: data-file, Next: index
  1848.  
  1849.  This example compares the data in the file population.dat to a theoretical
  1850.  curve:
  1851.  
  1852.        pop(x) = 103*exp((1965-x)/10)
  1853.        plot [1960:1990] 'population.dat', pop(x)
  1854.  
  1855.  The file "population.dat" might contain:
  1856.  
  1857.        # Gnu population in Antarctica since 1965
  1858.           1965   103
  1859.           1970   55
  1860.           1975   34
  1861.           1980   24
  1862.           1985   10
  1863.  
  1864.  
  1865. 
  1866. File: gnuplot.info, Node: index, Prev: example datafile, Up: data-file, Next: smooth
  1867.  
  1868.  The `index` keyword allows only some of the data sets in a multi-data-set
  1869.  file to be plotted.
  1870.  
  1871.  Syntax:
  1872.        plot 'file' index <m>{{:<n>}:<p>}
  1873.  
  1874.  Data sets are separated by pairs of blank records.  `index <m>` selects only
  1875.  set <m>; `index <m>:<n>` selects sets in the range <m> to <n>; and `index
  1876.  <m>:<n>:<p>` selects indices <m>, <m>+<p>, <m>+2<p>, etc., but stopping at
  1877.  <n>.  Following C indexing, the index 0 is assigned to the first data set in
  1878.  the file.  Specifying too large an index results in an error message.  If
  1879.  `index` is not specified, all sets are plotted as a single data set.
  1880.  
  1881.  Example:
  1882.        plot 'file' index 4:5
  1883.  
  1884. 
  1885. File: gnuplot.info, Node: smooth, Prev: index, Up: data-file, Next: acsplines
  1886.  
  1887.  `gnuplot` (*note gnuplot:: ) includes a few general-purpose routines for
  1888.  interpolation and approximation of data; these are grouped under the `smooth`
  1889.  option.  More sophisticated data processing may be performed by preprocessing
  1890.  the data externally or by using `fit` (*note fit:: ) with an appropriate
  1891.  model.
  1892.  
  1893.  Syntax:
  1894.        smooth {unique | csplines | acsplines | bezier | sbezier}
  1895.  
  1896.  `unique` (*note unique:: ) plots the data after making them monotonic.  Each
  1897.  of the other routines uses the data to determine the coefficients of a
  1898.  continuous curve between the endpoints of the data.  This curve is then
  1899.  plotted in the same manner as a function, that is, by finding its value at
  1900.  uniform intervals along the abscissa (see `set samples` (*note samples:: ))
  1901.  and connecting these points with straight line segments (if a line style is
  1902.  chosen).
  1903.  
  1904.  If `autoscale` (*note autoscale:: ) is in effect, the ranges will be computed
  1905.  such that the plotted curve lies within the borders of the graph.
  1906.  
  1907.  If too few points are available to allow the selected option to be applied,
  1908.  an error message is produced.  The minimum number is one for `unique`, four
  1909.  for `acsplines` (*note acsplines:: ), and three for the others.
  1910.  
  1911.  The `smooth` options have no effect on function plots.
  1912.  
  1913. * Menu:
  1914.  
  1915. * acsplines::
  1916. * bezier::
  1917. * csplines::
  1918. * sbezier::
  1919. * unique::
  1920.  
  1921. 
  1922. File: gnuplot.info, Node: acsplines, Prev: smooth, Up: smooth, Next: bezier
  1923.  
  1924.  `acsplines` approximates the data with a "natural smoothing spline".  After
  1925.  the data are made monotonic in x (see `smooth unique` (*note unique:: )), a
  1926.  curve is piecewise constructed from segments of cubic polynomials whose
  1927.  coefficients are found by the weighting the data points; the weights are taken
  1928.  from the third column in the data file.  That default can be modified by the
  1929.  third entry in the `using` (*note using:: ) list, e.g.,       plot 'data-file'
  1930.  using 1:2:(1.0) smooth acsplines
  1931.  
  1932.  Qualitatively, the absolute magnitude of the weights determines the number
  1933.  of segments used to construct the curve.  If the weights are large, the
  1934.  effect of each datum is large and the curve approaches that produced by
  1935.  connecting consecutive points with natural cubic splines.  If the weights are
  1936.  small, the curve is composed of fewer segments and thus is smoother; the
  1937.  limiting case is the single segment produced by a weighted linear least
  1938.  squares fit to all the data.  The smoothing weight can be expressed in terms
  1939.  of errors as a statistical weight for a point divided by a "smoothing factor"
  1940.  for the curve so that (standard) errors in the file can be used as smoothing
  1941.  weights.
  1942.  
  1943.  Example:
  1944.        sw(x,S)=1/(x*x*S)
  1945.        plot 'data_file' using 1:2:(sw($3,100)) smooth acsplines
  1946.  
  1947. 
  1948. File: gnuplot.info, Node: bezier, Prev: acsplines, Up: smooth, Next: csplines
  1949.  
  1950.  The `bezier` option approximates the data with a Bezier curve of degree n
  1951.  (the number of data points) that connects the endpoints.
  1952.  
  1953. 
  1954. File: gnuplot.info, Node: csplines, Prev: bezier, Up: smooth, Next: sbezier
  1955.  
  1956.  The `csplines` option connects consecutive points by natural cubic splines
  1957.  after rendering the data monotonic (see `smooth unique` (*note unique:: )).
  1958.  
  1959.  
  1960. 
  1961. File: gnuplot.info, Node: sbezier, Prev: csplines, Up: smooth, Next: unique
  1962.  
  1963.  The `sbezier` option first renders the data monotonic (`unique`
  1964.  (*note unique:: )) and then applies the `bezier` (*note bezier:: ) algorithm.
  1965.  
  1966.  
  1967. 
  1968. File: gnuplot.info, Node: unique, Prev: sbezier, Up: smooth
  1969.  
  1970.  The `unique` option makes the data monotonic in x; points with the same
  1971.  x-value are replaced by a single point having the average y-value.  The
  1972.  resulting points are then connected by straight line segments.
  1973.  
  1974. 
  1975. File: gnuplot.info, Node: special-filenames, Prev: smooth, Up: data-file, Next: thru
  1976.  
  1977.  A special filename of `'-'` specifies that the data are inline; i.e., they
  1978.  follow the command.  Only the data follow the command; `plot` (*note plot:: )
  1979.  options like filters, titles, and line styles remain on the 'plot' command
  1980.  line.  This is similar to << in unix shell script, and $DECK in VMS DCL.  The
  1981.  data are entered as though they are being read from a file, one data point per
  1982.  record. The letter "e" at the start of the first column terminates data
  1983.  entry.  The `using` (*note using:: ) option can be applied to these
  1984.  data---using it to filter them through a function might make sense, but
  1985.  selecting columns probably doesn't!
  1986.  
  1987.  `'-'` is intended for situations where it is useful to have data and commands
  1988.  together, e.g., when `gnuplot` (*note gnuplot:: ) is run as a sub-process of
  1989.  some front-end application.  Some of the demos, for example, might use this
  1990.  feature.  While `plot` options such as `index` (*note index:: ) and  `every`
  1991.  (*note every:: ) are recognized, their use forces you to enter data that won't
  1992.  be used.  For example, while
  1993.  
  1994.        plot '-' index 0, '-' index 1
  1995.        2
  1996.        4
  1997.        6
  1998.  
  1999.  
  2000.        10
  2001.        12
  2002.        14
  2003.        e
  2004.        2
  2005.        4
  2006.        6
  2007.  
  2008.  
  2009.        10
  2010.        12
  2011.        14
  2012.        e
  2013.  
  2014.  does indeed work,
  2015.  
  2016.        plot '-', '-'
  2017.        2
  2018.        4
  2019.        6
  2020.        e
  2021.        10
  2022.        12
  2023.        14
  2024.        e
  2025.  
  2026.  is a lot easier to type.
  2027.  
  2028.  If you use `'-'` with `replot` (*note replot:: ), you may need to enter the
  2029.  data more than once (see `replot`).
  2030.  
  2031.  A blank filename ('') specifies that the previous filename should be reused.
  2032.  This can be useful with things like
  2033.  
  2034.        plot 'a/very/long/filename' using 1:2, '' using 1:3, '' using 1:4
  2035.  
  2036.  (If you use both `'-'` and `''` on the same `plot` command, you'll need to
  2037.  have two sets of inline data, as in the example above.)
  2038.  
  2039.  On some computer systems with a popen function (Unix), the datafile can be
  2040.  piped through a shell command by starting the file name with a '<'.  For
  2041.  example,
  2042.  
  2043.        pop(x) = 103*exp(-x/10)
  2044.        plot "< awk '{print $1-1965, $2}' population.dat", pop(x)
  2045.  
  2046.  would plot the same information as the first population example but with
  2047.  years since 1965 as the x axis.  If you want to execute this example, you
  2048.  have to delete all comments from the data file above or substitute the
  2049.  following command for the first part of the command above (the part up to
  2050.  the comma):
  2051.  
  2052.        plot "< awk '$0 !~ /^#/ {print $1-1965, $2}' population.dat"
  2053.  
  2054.  While this approach is most flexible, it is possible to achieve simple
  2055.  filtering with the `using` or `thru` (*note thru:: ) keywords.
  2056.  
  2057.  
  2058. 
  2059. File: gnuplot.info, Node: thru, Prev: special-filenames, Up: data-file, Next: using
  2060.  
  2061.  The `thru` function is provided for backward compatibility.
  2062.  
  2063.  Syntax:
  2064.        plot 'file' thru f(x)
  2065.  
  2066.  It is equivalent to:
  2067.  
  2068.        plot 'file' using 1:(f($2))
  2069.  
  2070.  While the latter appears more complex, it is much more flexible.  The more
  2071.  natural
  2072.  
  2073.        plot 'file' thru f(y)
  2074.  
  2075.  also works (i.e. you can use y as the dummy variable).
  2076.  
  2077.  `thru` is parsed for `splot` (*note splot:: ) and  `fit` (*note fit:: ) but
  2078.  has no effect.
  2079.  
  2080.  
  2081. 
  2082. File: gnuplot.info, Node: using, Prev: thru, Up: data-file
  2083.  
  2084.  The most common datafile modifier is `using`.
  2085.  
  2086.  Syntax:
  2087.        plot 'file' using {<entry> {:<entry> {:<entry> ...}}} {'format'}
  2088.  
  2089.  If a format is specified, each datafile record is read using the C library's
  2090.  'scanf' function, with the specified format string.  Otherwise the record is
  2091.  read and broken into columns at spaces or tabs.  A format cannot be specified
  2092.  if time-format data is being used (this must be done by `set data time`).
  2093.  
  2094.  The resulting array of data is then sorted into columns according to the
  2095.  entries.  Each <entry> may be a simple column number, which selects the
  2096.  datum, an expression enclosed in parentheses, or empty.  The expression can
  2097.  use $1 to access the first item read, $2 for the second item, and so on.  It
  2098.  can also use `column(x)` and `valid(x)` where x is an arbitrary expression
  2099.  resulting in an integer.  `column(x)` returns the x'th datum; `valid(x)`
  2100.  tests that the datum in the x'th column is a valid number.  A column number
  2101.  of 0 generates a number increasing (from zero) with each point, and is reset
  2102.  upon encountering two blank records.  A column number of -1 gives the
  2103.  dataline number, which starts at 0, increments at single blank records, and
  2104.  is reset at double blank records.  A column number of -2 gives the index
  2105.  number, which is incremented only when two blank records are found.  An empty
  2106.  <entry> will default to its order in the list of entries.  For example,
  2107.  `using ::4` is interpreted as `using 1:2:4`.
  2108.  
  2109.  N.B.---the `call` (*note call:: ) command also uses $'s as a special
  2110.  character.  See call for details about how to include a column number in a
  2111.  `call` argument list.
  2112.  
  2113.  If the `using` list has but a single entry, that <entry> will be used for y
  2114.  and the data point number is used for x; for example, "`plot 'file' using 1`"
  2115.  is identical to "`plot 'file' using 0:1`".  If the `using` list has two
  2116.  entries, these will be used for x and y.  Additional entries are usually
  2117.  errors in x and/or y.  See `set style` (*note style:: ) for details about
  2118.  plotting styles that make use of error information, and `fit` (*note fit:: )
  2119.  for use of error information in curve fitting.
  2120.  
  2121.  'scanf' accepts several numerical specifications but `gnuplot`
  2122.  (*note gnuplot:: ) requires all inputs to be double-precision floating-point
  2123.  variables, so `lf` is the only permissible specifier.  'scanf' expects to see
  2124.  white space---a blank, tab ("\t"), newline ("\n"), or formfeed
  2125.  ("\f")---between numbers; anything else in the input stream must be explicitly
  2126.  skipped.
  2127.  
  2128.  Note that the use of "\t", "\n", or "\f" or requires use of double-quotes
  2129.  rather than single-quotes.
  2130.  
  2131.  Examples:
  2132.  
  2133.  This creates a plot of the sum of the 2nd and 3rd data against the first:
  2134.  (The format string specifies comma- rather than space-separated columns.)
  2135.        plot 'file' using 1:($2+$3) '%lf,%lf,%lf'
  2136.  
  2137.  In this example the data are read from the file "MyData" using a more
  2138.  complicated format:
  2139.        plot "MyData" using "%*lf%lf%*20[^\n]%lf"
  2140.  
  2141.  The meaning of this format is:
  2142.  
  2143.        %*lf        ignore a number
  2144.        %lf         read a double-precision number (x by default)
  2145.        %*20[^\n]   ignore 20 non-newline characters
  2146.        %lf         read a double-precision number (y by default)
  2147.  
  2148.  One trick is to use the ternary `?:` operator to filter data:
  2149.  
  2150.        plot 'file' using 1:($3>10 ? $2 : 1/0)
  2151.  
  2152.  which plots the datum in column two against that in column one provided
  2153.  the datum in column three exceeds ten.  `1/0` is undefined; `gnuplot`
  2154.  quietly ignores undefined points, so unsuitable points are suppressed.
  2155.  
  2156.  In fact, you can use a constant expression for the column number, provided it
  2157.  doesn't start with an opening parenthesis; constructs like `using
  2158.  0+(complicated expression)` can be used.  The crucial point is that the
  2159.  expression is evaluated once if it doesn't start with a left parenthesis, or
  2160.  once for each data point read if it does.
  2161.  
  2162.  If timeseries data are being used, the time can span multiple columns.  The
  2163.  starting column should be specified.  Note that the spaces within the time
  2164.  must be included when calculating starting columns for other data.  E.g., if
  2165.  the first element on a line is a time with an embedded space, the y value
  2166.  should be specified as column three.
  2167.  
  2168.  It should be noted that `plot 'file'`, `plot 'file' using 1:2`, and `plot
  2169.  (*note plot:: ) 'file' using ($1):($2)` can be subtly different: 1) if `file`
  2170.  has some lines with one column and some with two, the first will invent x
  2171.  values when they are missing, the second will quietly ignore the lines with
  2172.  one column, and the third will store an undefined value for lines with one
  2173.  point (so that in a plot with lines, no line joins points across the bad
  2174.  point); 2) if a line contains text at the first column, the first will abort
  2175.  the plot on an error, but the second and third should quietly skip the
  2176.  garbage.
  2177.  
  2178.  In fact, it is often possible to plot a file with lots of lines of garbage at
  2179.  the top simply by specifying
  2180.  
  2181.        plot 'file' using 1:2
  2182.  
  2183.  If you want to leave text in your data files, it is always safe to put the
  2184.  comment character (#) in the first column of the text lines.
  2185.  
  2186. 
  2187. File: gnuplot.info, Node: errorbars, Prev: data-file, Up: plot, Next: parametric
  2188.  
  2189.  Error bars are supported for 2-d data file plots by reading one to four
  2190.  additional columns (or `using` (*note using:: ) entries); these additional
  2191.  values are used in different ways by the various errorbar styles.
  2192.  
  2193.  In the default situation, `gnuplot` (*note gnuplot:: ) expects to see three,
  2194.  four, or six numbers on each line of the data file---either
  2195.  
  2196.        (x, y, ydelta),
  2197.        (x, y, ylow, yhigh),
  2198.        (x, y, xdelta),
  2199.        (x, y, xlow, xhigh),
  2200.        (x, y, xdelta, ydelta), or
  2201.        (x, y, xlow, xhigh, ylow, yhigh).
  2202.  
  2203.  The x coordinate must be specified.  The order of the numbers must be
  2204.  exactly as given above, though the `using` qualifier can manipulate the order
  2205.  and provide values for missing columns.  For example,
  2206.  
  2207.        plot 'file' with errorbars
  2208.        plot 'file' using 1:2:(sqrt($1)) with xerrorbars
  2209.        plot 'file' using 1:2:($1-$3):($1+$3):4:5 with xyerrorbars
  2210.  
  2211.  The last example is for a file containing an unsupported combination of
  2212.  relative x and absolute y errors.  The `using` entry generates absolute x min
  2213.  and max from the relative error.
  2214.  
  2215.  The y error bar is a vertical line plotted from (x, ylow) to (x, yhigh).
  2216.  If ydelta is specified instead of ylow and yhigh, ylow = y - ydelta and
  2217.  yhigh = y + ydelta are derived.  If there are only two numbers on the record,
  2218.  yhigh and ylow are both set to y.  The x error bar is a horizontal line
  2219.  computed in the same fashion.  To get lines plotted between the data points,
  2220.  `plot` (*note plot:: ) the data file twice, once with errorbars and once with
  2221.  lines (but remember to use the `notitle` option on one to avoid two entries in
  2222.  the key).
  2223.  
  2224.  The error bars have crossbars at each end unless `set bar` (*note bar:: ) is
  2225.  used (see set bar` for details).
  2226.  
  2227.  If autoscaling is on, the ranges will be adjusted to include the error bars.
  2228.  
  2229.  See `plot using`, `plot with` (*note with:: ), and  `set style`
  2230.  (*note style:: ) for more information.
  2231.  
  2232.  
  2233. 
  2234. File: gnuplot.info, Node: parametric, Prev: errorbars, Up: plot, Next: ranges
  2235.  
  2236.  When in parametric mode (`set parametric` (*note parametric:: )) mathematical
  2237.  expressions must be given in pairs for `plot` (*note plot:: ) and in triplets
  2238.  for  `splot` (*note splot:: ).
  2239.  
  2240.  Examples:
  2241.        plot sin(t),t**2
  2242.        splot cos(u)*cos(v),cos(u)*sin(v),sin(u)
  2243.  
  2244.  Data files are plotted as before, except any preceding parametric function
  2245.  must be fully specified before a data file is given as a plot.  In other
  2246.  words, the x parametric function (`sin(t)` above) and the y parametric
  2247.  function (`t**2` above) must not be interrupted with any modifiers or data
  2248.  functions; doing so will generate a syntax error stating that the parametric
  2249.  function is not fully specified.
  2250.  
  2251.  Other modifiers, such as `with` (*note with:: ) and  `title` (*note title:: ),
  2252.  may be specified only after the parametric function has been completed:
  2253.  
  2254.        plot sin(t),t**2 title 'Parametric example' with linespoints
  2255.  
  2256. 
  2257. File: gnuplot.info, Node: ranges, Prev: parametric, Up: plot, Next: title
  2258.  
  2259.  The optional ranges specify the region of the graph that will be displayed.
  2260.  
  2261.  Syntax:
  2262.        [{<dummy-var>=}{{<min>}:{<max>}}]
  2263.        [{{<min>}:{<max>}}]
  2264.  
  2265.  The first form applies to the independent variable (`xrange` (*note xrange:: )
  2266.  or  `trange` (*note trange:: ), if in parametric mode).  The second form
  2267.  applies to the dependent variable `yrange` (*note yrange:: ) (and xrange, too,
  2268.  if in parametric mode).  <dummy-var> is a new name for the independent
  2269.  variable.  (The defaults may be changed with `set dummy`.)  The optional <min>
  2270.  and <max> terms can be constant expressions or *.
  2271.  
  2272.  In non-parametric mode, the order in which ranges must be given is `xrange`
  2273.  and `yrange`.
  2274.  
  2275.  In parametric mode, the order for the `plot` (*note plot:: ) command is
  2276.  trange, xrange, and `yrange`.  The following `plot` command shows setting the
  2277.  `trange` to [-pi:pi], the `xrange` to [-1.3:1.3] and the `yrange` to [-1:1]
  2278.  for the duration of the graph:
  2279.  
  2280.        plot [-pi:pi] [-1.3:1.3] [-1:1] sin(t),t**2
  2281.  
  2282.  Note that the x2range and y2range cannot be specified here---`set x2range`
  2283.  (*note x2range:: ) and `set y2range` (*note y2range:: ) must be used.
  2284.  
  2285.  Ranges are interpreted in the order listed above for the appropriate mode.
  2286.  Once all those needed are specified, no further ones must be listed, but
  2287.  unneeded ones cannot be skipped---use an empty range `[]` as a placeholder.
  2288.  
  2289.  `*` can be used to allow autoscaling of either of min and max.  See also
  2290.  `set autoscale` (*note autoscale:: ).
  2291.  
  2292.  Ranges specified on the `plot` or `splot` (*note splot:: ) command line affect
  2293.  only that graph; use the `set xrange`, `set yrange`, etc., commands to change
  2294.  the default ranges for future graphs.
  2295.  
  2296.  With time data, you must provide the range (in the same manner as the time
  2297.  appears in the datafile) within quotes.  `gnuplot` (*note gnuplot:: ) uses the
  2298.   `timefmt` (*note timefmt:: ) string to read the value---see `set timefmt`.
  2299.  
  2300.  Examples:
  2301.  
  2302.  This uses the current ranges:
  2303.        plot cos(x)
  2304.  
  2305.  This sets the x range only:
  2306.        plot [-10:30] sin(pi*x)/(pi*x)
  2307.  
  2308.  This is the same, but uses t as the dummy-variable:
  2309.        plot [t = -10 :30]  sin(pi*t)/(pi*t)
  2310.  
  2311.  This sets both the x and y ranges:
  2312.        plot [-pi:pi] [-3:3]  tan(x), 1/x
  2313.  
  2314.  This sets only the y range, and turns off autoscaling on both axes:
  2315.        plot [ ] [-2:sin(5)*-8] sin(x)**besj0(x)
  2316.  
  2317.  This sets xmax and ymin only:
  2318.        plot [:200] [-pi:]  exp(sin(x))
  2319.  
  2320.  This sets the x range for a timeseries:
  2321.        set timefmt "%d/%m/%y %H:%M"
  2322.        plot ["1/6/93 12:00":"5/6/93 12:00"] 'timedata.dat'
  2323.  
  2324.  
  2325. 
  2326. File: gnuplot.info, Node: title, Prev: ranges, Up: plot, Next: with
  2327.  
  2328.  A line title for each function and data set appears in the key, accompanied
  2329.  by a sample of the line and/or symbol used to represent it.  It can be
  2330.  changed by using the `title` option.
  2331.  
  2332.  Syntax:
  2333.        title "<title>" | notitle
  2334.  
  2335.  where <title> is the new title of the line and must be enclosed in quotes.
  2336.  The quotes will not be shown in the key.  A special character may be given as
  2337.  a backslash followed by its octal value ("\345").  The tab character "\t" is
  2338.  understood.  Note that backslash processing occurs only for strings enclosed
  2339.  in double quotes---use single quotes to prevent such processing.  The newline
  2340.  character "\n" is not processed in key entries in either type of string.
  2341.  
  2342.  The line title and sample can be omitted from the key by using the keyword
  2343.  `notitle`.  A null title (`title ''`) is equivalent to `notitle`.  If only
  2344.  the sample is wanted, use one or more blanks (`title ' '`).
  2345.  
  2346.  By default the line title is the function or file name as it appears on the
  2347.  `plot` (*note plot:: ) command.  If it is a file name, any datafile modifiers
  2348.  specified will be included in the default title.
  2349.  
  2350.  The layout of the key itself (position, title justification, etc.) can be
  2351.  controlled by `set key` (*note key:: ).  Please see set key for details.
  2352.  
  2353.  Examples:
  2354.  
  2355.  This plots y=x with the title 'x':
  2356.        plot x
  2357.  
  2358.  This plots x squared with title "x^2" and "data.1" with title 'measured
  2359.  data':
  2360.        plot x**2 title "x^2", "data.1" t 'measured data'
  2361.  
  2362.  This puts an untitled circular border around a polar graph:
  2363.        set polar; plot my_function(t), 1 notitle
  2364.  
  2365. 
  2366. File: gnuplot.info, Node: with, Prev: title, Up: plot
  2367.  
  2368.  Functions and data may be displayed in one of a large number of styles.
  2369.  The `with` keyword provides the means of selection.
  2370.  
  2371.  Syntax:
  2372.        with <style> { {linestyle | ls <line_style>}
  2373.                       | {{linetype | lt <line_type>}
  2374.                          {linewidth | lw <line_width>}
  2375.                          {pointtype | pt <point_type>}
  2376.                          {pointsize | ps <point_size>}} }
  2377.  
  2378.  where <style> is either `lines` (*note lines:: ),  `points` (*note points:: ),
  2379.   `linespoints` (*note linespoints:: ),  `impulses` (*note impulses:: ),
  2380.   `dots` (*note dots:: ), `steps` (*note steps:: ),  `fsteps`
  2381.  (*note fsteps:: ),  `histeps` (*note histeps:: ),  `errorbars`
  2382.  (*note errorbars:: ),  `xerrorbars` (*note xerrorbars:: ),  `yerrorbars`
  2383.  (*note yerrorbars:: ), `xyerrorbars` (*note xyerrorbars:: ),  `boxes`
  2384.  (*note boxes:: ),  `boxerrorbars` (*note boxerrorbars:: ),  `boxxyerrorbars`
  2385.  (*note boxxyerrorbars:: ),  `financebars` (*note financebars:: ),
  2386.  `candlesticks` (*note candlesticks:: ) or  `vector` (*note vector:: ).  Some
  2387.  of these styles require additional information.  See `set style <style>` for
  2388.  details of each style.
  2389.  
  2390.  Default styles are chosen with the `set function style`
  2391.  (*note function style:: ) and  `set data style` (*note data style:: )
  2392.  commands.
  2393.  
  2394.  By default, each function and data file will use a different line type and
  2395.  point type, up to the maximum number of available types.  All terminal
  2396.  drivers support at least six different point types, and re-use them, in
  2397.  order, if more are required.  The LaTeX driver supplies an additional six
  2398.  point types (all variants of a circle), and thus will only repeat after 12
  2399.  curves are plotted with points.  The PostScript drivers (`postscript`
  2400.  (*note postscript:: )) supplies a total of 64.
  2401.  
  2402.  If you wish to choose the line or point type for a single plot, <line_type>
  2403.  and <point_type> may be specified.  These are positive integer constants (or
  2404.  expressions) that specify the line type and point type to be used for the
  2405.  plot.  Use `test` (*note test:: ) to display the types available for your
  2406.  terminal.
  2407.  
  2408.  You may also scale the line width and point size for a plot by using
  2409.  <line_width> and <point_size>, which are specified relative to the default
  2410.  values for each terminal.  The pointsize may also be altered globally---see
  2411.  `set pointsize` (*note pointsize:: ) for details.  But note that both
  2412.  <point_size> as set here and as set by `set pointsize` multiply the default
  2413.  point size---their effects are not cumulative.  That is, `set pointsize 2;
  2414.  plot x w p ps 3` will use points three times default size, not six.
  2415.  
  2416.  If you have defined specific line type/width and point type/size combinations
  2417.  with `set linestyle` (*note linestyle:: ), one of these may be selected by
  2418.  setting <line_style> to the index of the desired style.
  2419.  
  2420.  The keywords may be abbreviated as indicated.
  2421.  
  2422.  Note that the linewidth and pointsize options are not supported by all
  2423.  terminals.
  2424.  
  2425.  Examples:
  2426.  
  2427.  This plots sin(x) with impulses:
  2428.        plot sin(x) with impulses
  2429.  
  2430.  This plots x with points, x**2 with the default:
  2431.        plot x*y w points, x**2 + y**2
  2432.  
  2433.  This plots tan(x) with the default function style, "data.1" with lines:
  2434.        plot [ ] [-2:5] tan(x), "data.1" with l
  2435.  
  2436.  This plots "leastsq.dat" with impulses:
  2437.        plot 'leastsq.dat' w i
  2438.  
  2439.  This plots the data file 'population' with boxes:
  2440.        plot "population" with boxes
  2441.  
  2442.  This plots "exper.dat" with errorbars and lines connecting the points
  2443.  ('exper.dat' should have three or four data columns):
  2444.        plot 'exper.dat' w lines, 'exper.dat' notitle w errorbars
  2445.  
  2446.  This plots sin(x) and cos(x) with linespoints, using the same line type but
  2447.  different point types:
  2448.        plot sin(x) with linesp lt 1 pt 3, cos(x) with linesp lt 1 pt 4
  2449.  
  2450.  This plots file "data" with points of type 3 and twice usual size:
  2451.        plot "data" with points pointtype 3 pointsize 2
  2452.  
  2453.  This plots two data sets with lines differing only by weight:
  2454.        plot "d1" t "good" w l lt 2 lw 3, "d2" t "bad" w l lt 2 lw 1
  2455.  
  2456.  See `set style` (*note style:: ) to change the default styles.
  2457.  
  2458.  
  2459. 
  2460. File: gnuplot.info, Node: print, Prev: plot, Up: Commands, Next: pwd
  2461.  
  2462.  The `print` command prints the value of <expression> to the screen.  It is
  2463.  synonymous with `pause 0`.  <expression> may be anything that `gnuplot`
  2464.  (*note gnuplot:: ) can evaluate that produces a number, or it can be a
  2465.  string.
  2466.  
  2467.  Syntax:
  2468.        print <expression> {, <expression>, ...}
  2469.  
  2470.  See `expressions` (*note Expressions:: ).
  2471.  
  2472.  
  2473. 
  2474. File: gnuplot.info, Node: pwd, Prev: print, Up: Commands, Next: quit
  2475.  
  2476.  The `pwd` command prints the name of the working directory to the screen.
  2477.  
  2478. 
  2479. File: gnuplot.info, Node: quit, Prev: pwd, Up: Commands, Next: replot
  2480.  
  2481.  The `exit` (*note exit:: ) and quit commands and END-OF-FILE character will
  2482.  exit it `gnuplot` (*note gnuplot:: ). Each of these commands will clear the
  2483.  output device (as does the `clear` (*note clear:: ) command) before exiting.
  2484.  
  2485.  
  2486. 
  2487. File: gnuplot.info, Node: replot, Prev: quit, Up: Commands, Next: reread
  2488.  
  2489.  The `replot` command without arguments repeats the last `plot` (*note plot:: )
  2490.  or  `splot` (*note splot:: ) command.  This can be useful for viewing a plot
  2491.  with different `set` (*note set-show:: ) options, or when generating the same
  2492.  plot for several devices.
  2493.  
  2494.  Arguments specified after a `replot` command will be added onto the last
  2495.  `plot` or `splot` command (with an implied ',' separator) before it is
  2496.  repeated.  `replot` accepts the same arguments as the `plot` and `splot`
  2497.  commands except that ranges cannot be specified.  Thus you can use `replot`
  2498.  to plot a function against the second axes if the previous command was `plot`
  2499.  but not if it was `splot`, and similarly you can use `replot` to add a plot
  2500.  from a binary file only if the previous command was `splot`.
  2501.  
  2502.  N.B.---use of
  2503.  
  2504.        plot '-' ; ... ; replot
  2505.  
  2506.  is not recommended.  `gnuplot` (*note gnuplot:: ) does not store the inline
  2507.  data internally, so since `replot` appends new information to the previous
  2508.  `plot` and then executes the modified command, the `'-'` from the initial
  2509.  `plot` will expect to read inline data again.
  2510.  
  2511.  Note that `replot` does not work in `multiplot` (*note multiplot:: ) mode,
  2512.  since it reproduces only the last plot rather than the entire screen.
  2513.  
  2514.  See also `command-line-editing` (*note Command-line-editing:: ) for ways to
  2515.  edit the last plot (splot) command.
  2516.  
  2517.  
  2518. 
  2519. File: gnuplot.info, Node: reread, Prev: replot, Up: Commands, Next: reset
  2520.  
  2521.  The `reread` command causes the current `gnuplot` (*note gnuplot:: ) command
  2522.  file, as specified by a `load` (*note load:: ) command or on the command line,
  2523.  to be reset to its starting point before further commands are read from
  2524.  it.  This essentially implements an endless loop of the commands from the
  2525.  beginning of the command file to the `reread` command.  (But this is not
  2526.  necessarily a disaster---`reread` can be very useful when used in conjunction
  2527.  with `if` (*note if:: ).  See if for details.) The `reread` command has no
  2528.  effect if input from standard input.
  2529.  
  2530.  Examples:
  2531.  
  2532.  Suppose the file "looper" contains the commands
  2533.        a=a+1
  2534.        plot sin(x*a)
  2535.        pause -1
  2536.        if(a<5) reread
  2537.  and from within `gnuplot` you submit the commands
  2538.        a=0
  2539.        load 'looper'
  2540.  The result will be four plots (separated by the `pause` (*note pause:: )
  2541.  message).
  2542.  
  2543.  Suppose the file "data" contains six columns of numbers with a total yrange
  2544.  from 0 to 10; the first is x and the next are five different functions of x.
  2545.  Suppose also that the file "plotter" contains the commands
  2546.        c_p = c_p+1
  2547.        plot "$0" using 1:c_p with lines linetype c_p
  2548.        if(c_p <  n_p) reread
  2549.  and from within `gnuplot` you submit the commands
  2550.        n_p=6
  2551.        c_p=1
  2552.        set nokey
  2553.        set yrange [0:10]
  2554.        set multiplot
  2555.        call 'plotter' 'data'
  2556.        set nomultiplot
  2557.  The result is a single graph consisting of five plots.  The yrange must be
  2558.  set explicitly to guarantee that the five separate graphs (drawn on top of
  2559.  each other in multiplot mode) will have exactly the same axes.  The linetype
  2560.  must be specified; otherwise all the plots would be drawn with the same type.
  2561.  
  2562. 
  2563. File: gnuplot.info, Node: reset, Prev: reread, Up: Commands, Next: save
  2564.  
  2565.  The `reset` command causes all options that can be set with the `set`
  2566.  (*note set-show:: ) command to take on their default values.  The only
  2567.  exceptions are that the terminal set with `set term` (*note terminal:: ) and
  2568.  the output file set with  `set output` (*note output:: ) are left
  2569.  unchanged.  This command is useful, e.g., to restore the default settings at
  2570.  the end of a command file, or to return to a defined state after lots of
  2571.  settings have been changed within a command file.  Please refer to the `set`
  2572.  command to see the default values that the various options take.
  2573.  
  2574.  
  2575. 
  2576. File: gnuplot.info, Node: save, Prev: reset, Up: Commands, Next: set-show
  2577.  
  2578.  The `save` command saves user-defined functions, variables, `set`
  2579.  (*note set-show:: ) options, or all three, plus the last `plot`
  2580.  (*note plot:: ) ((`splot` (*note splot:: )) command to the specified file.
  2581.  
  2582.  Syntax:
  2583.        save  {<option>} "<filename>"
  2584.  
  2585.  where <option> is `functions` (*note functions:: ),  `variables`
  2586.  (*note variables:: ) or set. If no option is used, `gnuplot`
  2587.  (*note gnuplot:: ) saves functions, variables, set options and the last plot
  2588.  (`splot`) command.
  2589.  
  2590.  `save`d files are written in text format and may be read by the `load`
  2591.  (*note load:: ) command.
  2592.  
  2593.  The filename must be enclosed in quotes.
  2594.  
  2595.  Examples:
  2596.        save "work.gnu"
  2597.        save functions 'func.dat'
  2598.        save var 'var.dat'
  2599.        save set "options.dat"
  2600.  
  2601. 
  2602. File: gnuplot.info, Node: set-show, Prev: save, Up: Commands, Next: angles
  2603.  
  2604.  The `set` command sets _lots_ of options.  No screen is drawn, however, until
  2605.  a `plot` (*note plot:: ),  `splot` (*note splot:: ), or  `replot`
  2606.  (*note replot:: ) command is given.
  2607.  
  2608.  The `show` command shows their settings.  `show all` shows all the
  2609.  settings.
  2610.  
  2611.  If a variable contains time/date data, `show` will display it according to
  2612.  the format currently defined by `set timefmt` (*note timefmt:: ), even if that
  2613.  was not in effect when the variable was initially defined.
  2614.  
  2615.  
  2616. * Menu:
  2617.  
  2618. * angles::
  2619. * arrow::
  2620. * autoscale::
  2621. * bar::
  2622. * bmargin::
  2623. * border::
  2624. * boxwidth::
  2625. * clabel::
  2626. * clip::
  2627. * cntrparam::
  2628. * contour::
  2629. * data style::
  2630. * dgrid3d::
  2631. * dummy::
  2632. * encoding::
  2633. * format::
  2634. * function style::
  2635. * functions::
  2636. * grid::
  2637. * hidden3d::
  2638. * isosamples::
  2639. * key::
  2640. * label::
  2641. * linestyle::
  2642. * lmargin::
  2643. * locale::
  2644. * logscale::
  2645. * mapping::
  2646. * margin::
  2647. * missing::
  2648. * multiplot::
  2649. * mx2tics::
  2650. * mxtics::
  2651. * my2tics::
  2652. * mytics::
  2653. * mztics::
  2654. * offsets::
  2655. * origin::
  2656. * output::
  2657. * parametric::
  2658. * pointsize::
  2659. * polar::
  2660. * rmargin::
  2661. * rrange::
  2662. * samples::
  2663. * size::
  2664. * style::
  2665. * surface::
  2666. * terminal::
  2667. * tics::
  2668. * ticslevel::
  2669. * ticscale::
  2670. * timestamp::
  2671. * timefmt::
  2672. * title::
  2673. * tmargin::
  2674. * trange::
  2675. * urange::
  2676. * variables::
  2677. * view::
  2678. * vrange::
  2679. * x2data::
  2680. * x2dtics::
  2681. * x2label::
  2682. * x2mtics::
  2683. * x2range::
  2684. * x2tics::
  2685. * x2zeroaxis::
  2686. * xdata::
  2687. * xdtics::
  2688. * xlabel::
  2689. * xmtics::
  2690. * xrange::
  2691. * xtics::
  2692. * xzeroaxis::
  2693. * y2data::
  2694. * y2dtics::
  2695. * y2label::
  2696. * y2mtics::
  2697. * y2range::
  2698. * y2tics::
  2699. * y2zeroaxis::
  2700. * ydata::
  2701. * ydtics::
  2702. * ylabel::
  2703. * ymtics::
  2704. * yrange::
  2705. * ytics::
  2706. * yzeroaxis::
  2707. * zdata::
  2708. * zdtics::
  2709. * zero::
  2710. * zeroaxis::
  2711. * zlabel::
  2712. * zmtics::
  2713. * zrange::
  2714. * ztics::
  2715.  
  2716. 
  2717. File: gnuplot.info, Node: angles, Prev: set-show, Up: set-show, Next: arrow
  2718.  
  2719.  By default, `gnuplot` (*note gnuplot:: ) assumes the independent variable in
  2720.  polar graphs is in units of radians.  If `set angles degrees` is specified
  2721.  before `set polar` (*note polar:: ), then the default range is [0:360] and the
  2722.  independent variable has units of degrees.  This is particularly useful for
  2723.  plots of data files.  The angle setting also applies to 3-d mapping as set via
  2724.  the `set mapping` (*note mapping:: ) command.
  2725.  
  2726.  Syntax:
  2727.        set angles {degrees | radians}
  2728.        show angles
  2729.  
  2730.  The angle specified in `set grid polar` is also read and displayed in the
  2731.  units specified by `set angles`.
  2732.  
  2733.  `set angles` also affects the arguments of the machine-defined functions
  2734.  sin(x), cos(x) and tan(x), and the outputs of asin(x), acos(x), atan(x),
  2735.  atan2(x), and arg(x).  It has no effect on the arguments of hyperbolic
  2736.  functions or Bessel functions.  Note that the output of inverse hyperbolic
  2737.  functions of complex arguments are effected, however; if these functions are
  2738.  used, `set angles radians` must be in effect:
  2739.  
  2740.        x={1.0,0.1}
  2741.        set angles radians
  2742.        y=sinh(x)
  2743.        print y         #prints {1.16933, 0.154051}
  2744.        print asinh(y)  #prints {1.0, 0.1}
  2745.  but
  2746.        set angles degrees
  2747.        y=sinh(x)
  2748.        print y         #prints {1.16933, 0.154051}
  2749.        print asinh(y)  #prints {57.29578, 5.729578}
  2750.  
  2751. 
  2752. File: gnuplot.info, Node: arrow, Prev: angles, Up: set-show, Next: autoscale
  2753.  
  2754.  Arbitrary arrows can be placed on a plot using the `set arrow` command.
  2755.  
  2756.  Syntax:
  2757.        set arrow {<tag>} {from <position>} {to <position>} {{no}head}
  2758.                  { {linestyle | ls <line_style>}
  2759.                    | {linetype | lt <line_type>}
  2760.                      {linewidth | lw <line_width} }
  2761.        set noarrow {<tag>}
  2762.        show arrow
  2763.  
  2764.  <tag> is an integer that identifies the arrow.  If no tag is given, the
  2765.  lowest unused tag value is assigned automatically.  The tag can be used to
  2766.  delete or change a specific arrow.  To change any attribute of an existing
  2767.  arrow, use the `set arrow` command with the appropriate tag and specify the
  2768.  parts of the arrow to be changed.
  2769.  
  2770.  The <position>s are specified by either x,y or x,y,z, and may be preceded by
  2771.  `first`, `second`, `graph`, or `screen` to select the coordinate system.
  2772.  Unspecified coordinates default to 0.  The endpoints can be specified in
  2773.  one of four coordinate systems---`first` or `second` axes, `graph` or
  2774.  `screen`.  See `coordinates` (*note Coordinates:: ) for details.  A coordinate
  2775.  system specifier does not carry over from the "from" position to the "to"
  2776.  position.  Arrows outside the screen boundaries are permitted but may cause
  2777.  device errors.
  2778.  
  2779.  Specifying `nohead` produces an arrow drawn without a head---a line segment.
  2780.  This gives you yet another way to draw a line segment on the plot.  By
  2781.  default, arrows have heads.
  2782.  
  2783.  The line style may be selected from a user-defined list of line styles (see
  2784.  `set linestyle` (*note linestyle:: )) or may be defined here by providing
  2785.  values for <line_type> (an index from the default list of styles) and/or
  2786.  <line_width> (which is a multiplier for the default width).
  2787.  
  2788.  Note, however, that if a user-defined line style has been selected, its
  2789.  properties (type and width) cannot be altered merely by issuing another
  2790.  `set arrow` command with the appropriate index and `lt` or `lw`.
  2791.  
  2792.  Examples:
  2793.  
  2794.  To set an arrow pointing from the origin to (1,2) with user-defined style 5,
  2795.  use:
  2796.        set arrow to 1,2 ls 5
  2797.  
  2798.  To set an arrow from bottom left of plotting area to (-5,5,3), and tag the
  2799.  arrow number 3, use:
  2800.        set arrow 3 from graph 0,0 to -5,5,3
  2801.  
  2802.  To change the preceding arrow to end at 1,1,1, without an arrow head and
  2803.  double its width, use:
  2804.        set arrow 3 to 1,1,1 nohead lw 2
  2805.  
  2806.  To draw a vertical line from the bottom to the top of the graph at x=3, use:
  2807.        set arrow from 3, graph 0 to 3, graph 1 nohead
  2808.  
  2809.  To delete arrow number 2, use:
  2810.        set noarrow 2
  2811.  
  2812.  To delete all arrows, use:
  2813.        set noarrow
  2814.  
  2815.  To show all arrows (in tag order), use:
  2816.        show arrow
  2817.  
  2818. 
  2819. File: gnuplot.info, Node: autoscale, Prev: arrow, Up: set-show, Next: parametric mode
  2820.  
  2821.  Autoscaling may be set individually on the x, y or z axis or globally on all
  2822.  axes. The default is to autoscale all axes.
  2823.  
  2824.  Syntax:
  2825.        set autoscale {<axes>{min|max}}
  2826.        set noautoscale {<axes>{min|max}}
  2827.        show autoscale
  2828.  
  2829.  where <axes> is either `x`, `y`, `z`, `x2`, `y2` or `xy`.  A keyword with
  2830.  `min` or `max` appended (this cannot be done with `xy`) tells `gnuplot`
  2831.  (*note gnuplot:: ) to autoscale just the minimum or maximum of that axis.  If
  2832.  no keyword is given, all axes are autoscaled.
  2833.  
  2834.  When autoscaling, the axis range is automatically computed and the dependent
  2835.  axis (y for a `plot` (*note plot:: ) and z for  `splot` (*note splot:: )) is
  2836.  scaled to include the range of the function or data being plotted.
  2837.  
  2838.  If autoscaling of the dependent axis (y or z) is not set, the current y or z
  2839.  range is used.
  2840.  
  2841.  Autoscaling the independent variables (x for `plot` and x,y for `splot`) is a
  2842.  request to set the domain to match any data file being plotted.  If there are
  2843.  no data files, autoscaling an independent variable has no effect.  In other
  2844.  words, in the absence of a data file, functions alone do not affect the x
  2845.  range (or the y range if plotting z = f(x,y)).
  2846.  
  2847.  Please see `set xrange` (*note xrange:: ) for additional information about
  2848.  ranges.
  2849.  
  2850.  The behavior of autoscaling remains consistent in parametric mode, (see `set
  2851.  parametric`).  However, there are more dependent variables and hence more
  2852.  control over x, y, and z axis scales.  In parametric mode, the independent or
  2853.  dummy variable is t for `plot`s and u,v for `splot`s.  `autoscale` in
  2854.  parametric mode, then, controls all ranges (t, u, v, x, y, and z) and allows
  2855.  x, y, and z to be fully autoscaled.
  2856.  
  2857.  Autoscaling works the same way for polar mode as it does for parametric mode
  2858.  for `plot`, with the extension that in polar mode `set dummy` (*note dummy:: )
  2859.  can be used to change the independent variable from t (see `set dummy`).
  2860.  
  2861.  When tics are displayed on second axes but no plot has been specified for
  2862.  those axes, x2range and y2range are inherited from xrange and yrange.  This
  2863.  is done _before_ xrange and yrange are autoextended to a whole number of
  2864.  tics, which can cause unexpected results.
  2865.  
  2866.  Examples:
  2867.  
  2868.  This sets autoscaling of the y axis (other axes are not affected):
  2869.        set autoscale y
  2870.  
  2871.  This sets autoscaling only for the minimum of the y axis (the maximum of the
  2872.  y axis and the other axes are not affected):
  2873.        set autoscale ymin
  2874.  
  2875.  This sets autoscaling of the x and y axes:
  2876.        set autoscale xy
  2877.  
  2878.  This sets autoscaling of the x, y, z, x2 and y2 axes:
  2879.        set autoscale
  2880.  
  2881.  This disables autoscaling of the x, y, z, x2 and y2 axes:
  2882.        set noautoscale
  2883.  
  2884.  This disables autoscaling of the z axis only:
  2885.        set noautoscale z
  2886.  
  2887. * Menu:
  2888.  
  2889. * parametric mode::
  2890. * polar mode::
  2891.  
  2892. 
  2893. File: gnuplot.info, Node: parametric mode, Prev: autoscale, Up: autoscale, Next: polar mode
  2894.  
  2895.  When in parametric mode (`set parametric` (*note parametric:: )), the xrange
  2896.  is as fully scalable as the y range.  In other words, in parametric mode the x
  2897.  axis can be automatically scaled to fit the range of the parametric function
  2898.  that is being plotted.  Of course, the y axis can also be automatically scaled
  2899.  just as in the non-parametric case.  If autoscaling on the x axis is not set,
  2900.  the current x range is used.
  2901.  
  2902.  Data files are plotted the same in parametric and non-parametric mode.
  2903.  However, there is a difference in mixed function and data plots: in
  2904.  non-parametric mode with autoscaled x, the x range of the datafile controls
  2905.  the x range of the functions; in parametric mode it has no influence.
  2906.  
  2907.  For completeness a last command `set autoscale t` is accepted.  However, the
  2908.  effect of this "scaling" is very minor.  When `gnuplot` (*note gnuplot:: )
  2909.  determines that the t range would be empty, it makes a small adjustment if
  2910.  autoscaling is true. Otherwise, `gnuplot` gives an error.  Such behavior may,
  2911.  in fact, not be very useful and the command `set autoscale t` is certainly
  2912.  questionable.
  2913.  
  2914.  `splot` (*note splot:: ) extends the above ideas as you would expect.  If
  2915.  autoscaling is set, then x, y, and z ranges are computed and each axis scaled
  2916.  to fit the resulting data.
  2917.  
  2918.  
  2919. 
  2920. File: gnuplot.info, Node: polar mode, Prev: parametric mode, Up: autoscale
  2921.  
  2922.  When in polar mode (`set polar` (*note polar:: )), the xrange and the yrange
  2923.  are both found from the polar coordinates, and thus they can both be
  2924.  automatically scaled. In other words, in polar mode both the x and y axes can
  2925.  be automatically scaled to fit the ranges of the polar function that is being
  2926.  plotted.
  2927.  
  2928.  When plotting functions in polar mode, the rrange may be autoscaled.  When
  2929.  plotting data files in polar mode, the trange may also be autoscaled.  Note
  2930.  that if the trange is contained within one quadrant, autoscaling will produce
  2931.  a polar plot of only that single quadrant.
  2932.  
  2933.  Explicitly setting one or two ranges but not others may lead to unexpected
  2934.  results.
  2935.  
  2936. 
  2937. File: gnuplot.info, Node: bar, Prev: autoscale, Up: set-show, Next: bmargin
  2938.  
  2939.  The `set bar` command controls the tics at the ends of errorbars.
  2940.  
  2941.  Syntax:
  2942.        set bar {small | large | <size>}
  2943.        show bar
  2944.  
  2945.  `small` is a synonym for 0.0, and `large` for 1.0.
  2946.  The default is 1.0 if no size is given.
  2947.  
  2948. 
  2949. File: gnuplot.info, Node: bmargin, Prev: bar, Up: set-show, Next: border
  2950.  
  2951.  The command `set bmargin` sets the size of the bottom margin.  Please see
  2952.  `set margin` (*note margin:: ) for details.
  2953.  
  2954.  
  2955. 
  2956. File: gnuplot.info, Node: border, Prev: bmargin, Up: set-show, Next: boxwidth
  2957.  
  2958.  The `set border` and `set noborder` commands control the display of the graph
  2959.  borders for the `plot` (*note plot:: ) and  `splot` (*note splot:: )
  2960.  commands.
  2961.  
  2962.  Syntax:
  2963.        set border {<integer>}
  2964.        set noborder
  2965.        show border
  2966.  
  2967.  The borders are encoded in a 12-bit integer.  The bottom four bits control
  2968.  the border for `plot` and the sides of the base for `splot`, the next four
  2969.  bits control the verticals in `splot` and the top four bits control the edges
  2970.  on top of the `splot`.  In detail, the `<integer>` should be the sum of the
  2971.  appropriate entries from the following table:
  2972.  
  2973.                          plot border
  2974.                              and
  2975.                          splot base    splot verticals    splot top
  2976.        bottom (south)         1              16              256
  2977.        left   (west)          2              32              512
  2978.        top    (north)         4              64             1024
  2979.        right  (east)          8             128             2048
  2980.  
  2981.  The default is 31, which is all four sides for `plot`, and base and z axis
  2982.  for `splot`.
  2983.  
  2984.  To have tics on edges other than bottom and left, disable the usual tics and
  2985.  enable the second axes.
  2986.  
  2987.  Examples:
  2988.  
  2989.  Draw all borders:
  2990.        set border
  2991.  
  2992.  Draw only the SOUTHWEST borders:
  2993.        set border 3
  2994.  
  2995.  Draw a complete box around a `splot`:
  2996.        set border 4095
  2997.  
  2998.  Draw a partial box, omitting the front vertical:
  2999.        set border 127+256+512
  3000.  
  3001.  Draw only the NORTHEAST borders:
  3002.        set noxtics; set noytics; set x2tics; set y2tics; set border 12
  3003.  
  3004.  
  3005. 
  3006. File: gnuplot.info, Node: boxwidth, Prev: border, Up: set-show, Next: clabel
  3007.  
  3008.  The `set boxwidth` command is used to set the default width of boxes in the
  3009.  `boxes` (*note boxes:: ) and  `boxerrorbars` (*note boxerrorbars:: ) styles.
  3010.  
  3011.  Syntax:
  3012.        set boxwidth {<width>}
  3013.        show boxwidth
  3014.  
  3015.  If a data file is plotted without the width being specified in the third,
  3016.  fourth, or fifth column (or `using` (*note using:: ) entry), or if a function
  3017.  is plotted, the width of each box is set by the `set boxwidth` command.  (If a
  3018.  width is given both in the file and by the `set boxwidth` command, the one in
  3019.  the file is used.)  If the width is not specified in one of these ways, the
  3020.  width of each box will be calculated automatically so that it touches the
  3021.  adjacent boxes. In a four-column data set, the fourth column will be
  3022.  interpreted as the box width unless the width is set to -2.0, in which case
  3023.  the width will be calculated automatically.  See `set style boxerrorbars` for
  3024.  more details.
  3025.  
  3026.  To set the box width to automatic use the command
  3027.        set boxwidth
  3028.  or, for four-column data,
  3029.        set boxwidth -2
  3030.  
  3031.  The same effect can be achieved with the `using` keyword in `plot`
  3032.  (*note plot:: ):       plot 'file' using 1:2:3:4:(-2)
  3033.  
  3034.  
  3035. 
  3036. File: gnuplot.info, Node: clabel, Prev: boxwidth, Up: set-show, Next: clip
  3037.  
  3038.  `gnuplot` (*note gnuplot:: ) will vary the linetype used for each contour
  3039.  level when clabel is set.  When this option on (the default), a legend labels
  3040.  each linestyle with the z level it represents.  It is not possible at present
  3041.  to separate the contour labels from the surface key.
  3042.  
  3043.  Syntax:
  3044.        set clabel {'<format>'}
  3045.        set noclabel
  3046.        show clabel
  3047.  
  3048.  The default for the format string is %8.3g, which gives three decimal places.
  3049.  This may produce poor label alignment if the key is altered from its default
  3050.  configuration.
  3051.  
  3052.  See also `set contour` (*note contour:: ).
  3053.  
  3054.  
  3055. 
  3056. File: gnuplot.info, Node: clip, Prev: clabel, Up: set-show, Next: cntrparam
  3057.  
  3058.  `gnuplot` (*note gnuplot:: ) can clip data points and lines that are near the
  3059.  boundaries of a graph.
  3060.  
  3061.  Syntax:
  3062.        set clip <clip-type>
  3063.        set noclip <clip-type>
  3064.        show clip
  3065.  
  3066.  Three clip types are supported by `gnuplot`: `points` (*note points:: ), one,
  3067.  and two. One, two, or all three clip types may be active for a single graph.
  3068.  
  3069.  The `points` clip type forces `gnuplot` to clip (actually, not plot at all)
  3070.  data points that fall within but too close to the boundaries.  This is done
  3071.  so that large symbols used for points will not extend outside the boundary
  3072.  lines.  Without clipping points near the boundaries, the plot may look bad.
  3073.  Adjusting the x and y ranges may give similar results.
  3074.  
  3075.  Setting the `one` clip type causes `gnuplot` to draw a line segment which has
  3076.  only one of its two endpoints within the graph.  Only the in-range portion of
  3077.  the line is drawn.  The alternative is to not draw any portion of the line
  3078.  segment.
  3079.  
  3080.  Some lines may have both endpoints out of range, but pass through the graph.
  3081.  Setting the `two` clip-type allows the visible portion of these lines to be
  3082.  drawn.
  3083.  
  3084.  In no case is a line drawn outside the graph.
  3085.  
  3086.  The defaults are `noclip points`, `clip one`, and `noclip two`.
  3087.  
  3088.  To check the state of all forms of clipping, use
  3089.        show clip
  3090.  
  3091.  For backward compatibility with older versions, the following forms are also
  3092.  permitted:
  3093.        set clip
  3094.        set noclip
  3095.  
  3096.  `set clip` is synonymous with `set clip points`; `set noclip` turns off all
  3097.  three types of clipping.
  3098.  
  3099. 
  3100. File: gnuplot.info, Node: cntrparam, Prev: clip, Up: set-show, Next: contour
  3101.  
  3102.  `set cntrparam` controls the generation of contours and their smoothness for
  3103.  a contour plot.
  3104.  
  3105.  Syntax:
  3106.        set cntrparam {  {linear | cubicspline | bspline}
  3107.                       | points <n> | order <n>
  3108.                       | levels  {auto} {<n>}
  3109.                               | discrete <z1> {,<z2>} ...
  3110.                               | incremental {<start>, <incr> {,<end>}} }
  3111.        show cntrparam
  3112.  
  3113.  This command controls the way contours are plotted.  <n> should be an
  3114.  integral constant expression and <z1>, <z2> ... any constant expressions.
  3115.  The parameters are:
  3116.  
  3117.  `linear`, `cubicspline`, `bspline`---Controls type of approximation or
  3118.  interpolation.  If `linear`, then the contours are drawn piecewise linear, as
  3119.  extracted from the surface directly.  If `cubicspline`, then piecewise linear
  3120.  contours are interpolated to form somewhat smoother contours, but which may
  3121.  undulate.  If `bspline`, a guaranteed-smoother curve is drawn, which only
  3122.  approximates the piecewise linear data.
  3123.  
  3124.  `points` (*note points:: )---Eventually all drawings are done with piecewise
  3125.  linear strokes. This number controls the number of points used to approximate
  3126.  a curve. It is relevant only for `cubicspline` and `bspline` modes.
  3127.  
  3128.  `order`---Order of the bspline approximation to be used.  The bigger this
  3129.  order is, the smoother the resulting contour.  (Of course, higher order
  3130.  bspline curves will move further away from the original piecewise linear
  3131.  data.)  This option is relevant for `bspline` mode only.  Allowed values are
  3132.  integers in the range from 2 (linear) to 10.
  3133.  
  3134.  `levels`---Approximate number of contour levels.  Selection of the levels is
  3135.  controlled by `auto` (default), `discrete`, and `incremental`.  For `auto`,
  3136.  if the surface is bounded by zmin and zmax, contours will be generated at
  3137.  integer multiples of dz between zmin and zmax, where dz is 1, 2, or 5 times
  3138.  some power of ten (like the step between two tic marks).  For `discrete`,
  3139.  contours will be generated at z = <z1>, <z2> ... as specified.  The number of
  3140.  discrete levels is limited to MAX_DISCRETE_LEVELS, defined in plot.h to be
  3141.  30.  If `incremental`, contours are generated at values of z beginning at
  3142.  <start> and increasing by <increment> until <end> is reached.  If <end> is
  3143.  not specified, MAX_DISCRETE_LEVELS will be generated.
  3144.  
  3145.  If the command `set cntrparam` is given without any arguments specified,  the
  3146.  defaults are used: linear, 5 points, order 4, 5 `auto` levels.
  3147.  
  3148.  Examples:
  3149.        set cntrparam bspline
  3150.        set cntrparam points 7
  3151.        set cntrparam order 10
  3152.  
  3153.  To select 5 levels automatically:
  3154.        set cntrparam levels auto 5
  3155.  
  3156.  To specify discrete levels at .1, .37, and .9:
  3157.        set cntrparam levels discrete .1,1/exp(1),.9
  3158.  
  3159.  To specify levels from 0 to 4 with increment 1:
  3160.        set cntrparam levels incremental  0,1,4
  3161.  
  3162.  To set the number of levels to 10 (retaining the current settings of auto,
  3163.  discr. and increment's start and increment value, while changing its end):
  3164.        set cntrparam levels 10
  3165.  
  3166.  To set the start and increment while retaining the number of levels:
  3167.        set cntrparam levels incremental 100,50
  3168.  
  3169.  See also `set contour` (*note contour:: ) for control of where the contours
  3170.  are drawn, and set clabel` for control of the format of the contour labels.
  3171.  
  3172.  
  3173. 
  3174. File: gnuplot.info, Node: contour, Prev: cntrparam, Up: set-show, Next: data style
  3175.  
  3176.  `set contour` enables contour drawing for surfaces. This option is available
  3177.  for `splot` (*note splot:: ) only.
  3178.  
  3179.  Syntax:
  3180.        set contour {base | surface | both}
  3181.        set nocontour
  3182.        show contour
  3183.  
  3184.  The three options specify where to draw the contours: `base` draws the
  3185.  contours on the grid base where the x/ytics are placed, `surface`
  3186.  (*note surface:: ) draws the contours on the surfaces themselves, and `both`
  3187.  draws the contours on both the base and the surface.  If no option is
  3188.  provided, the default is `base`.
  3189.  
  3190.  See also `set cntrparam` (*note cntrparam:: ) for the parameters that affect
  3191.  the drawing of contours, and `set clabel` (*note clabel:: ) for control of
  3192.  labelling of the contours.
  3193.  
  3194.  The surface can be switched off (see `set surface`), giving a contour-only
  3195.  graph.  Though it is possible to use `set view` (*note view:: ) to enlarge the
  3196.  plot to fill the screen, better results can be obtained by writing the contour
  3197.  information out to a file, and rereading it as a 2-d datafile plot:
  3198.  
  3199.        set nosurface
  3200.        set contour
  3201.        set cntrparam ...
  3202.        set term table
  3203.        set out 'filename'
  3204.        splot ...
  3205.        set out
  3206.        # contour info now in filename
  3207.        set term <whatever>
  3208.        plot 'filename'
  3209.  
  3210.  In order to draw contours, the data must be organized as "grid data".  In
  3211.  such a file all of the points for a single y value are listed, then all the
  3212.  points for the next y, and so on.  A single blank line (a line containing no
  3213.  characters other than blank spaces and a carriage return and/or a line feed)
  3214.  separates one y value group from the next.  See also `plot datafile`
  3215.  (*note data-file:: ).
  3216.  
  3217.  If contours are desired from non-grid data, `set dgrid3d` (*note dgrid3d:: )
  3218.  can be used to create an appropriate grid.  See `set dgrid3d` for more
  3219.  information.
  3220.  
  3221.  
  3222. 
  3223. File: gnuplot.info, Node: data style, Prev: contour, Up: set-show, Next: dgrid3d
  3224.  
  3225.  The `set data style` command changes the default plotting style for data
  3226.  plots.
  3227.  
  3228.  Syntax:
  3229.        set data style <style-choice>
  3230.        show data style
  3231.  
  3232.  See `set style` (*note style:: ) for the choices.  If no choice is given, the
  3233.  choices are listed.  `show data style` shows the current default data plotting
  3234.  style.
  3235.  
  3236.  
  3237. 
  3238. File: gnuplot.info, Node: dgrid3d, Prev: data style, Up: set-show, Next: dummy
  3239.  
  3240.  The `set dgrid3d` command enables and sets the different parameters for
  3241.  non-grid to grid data mapping.
  3242.  
  3243.  Syntax:
  3244.        set dgrid3d {<row_size>} {,{<col_size>} {,<norm>}}
  3245.        set nodgrid3d
  3246.        show dgrid3d
  3247.  
  3248.  By default `dgrid3d` is disabled.  When enabled, 3-d data read from a file
  3249.  are always treated as a scattered data set.  A grid with dimensions derived
  3250.  from a bounding box of the scattered data and size as specified by the
  3251.  row/col_size parameters is created for plotting and contouring.  The grid is
  3252.  equally spaced in x and y; the z values are computed as weighted averages of
  3253.  the scattered points' values.
  3254.  
  3255.  The third parameter, norm, controls the weighting: each point is weighted
  3256.  inversely by its distance (from the grid point) raised to the norm power.
  3257.  (Actually it's not quite the distance: the weights are given by the inverse
  3258.  of dx^norm + dy^norm, where dx and dy are the components of the separation
  3259.  of the grid point from each data point.)  Thus the closer the data point is
  3260.  to a grid point, the more effect it has on that grid point.  In `gnuplot`
  3261.  (*note gnuplot:: ), this distance computation is optimized for norms that are
  3262.  powers of 2, specifically 1, 2, 4, 8, and 16, but any non-negative integer can
  3263.  be used.
  3264.  
  3265.  The `dgrid3d` option is a simple low pass filter that converts scattered data
  3266.  to a grid data set.  More sophisticated approaches to this problem exist and
  3267.  should be used to preprocess the data outside `gnuplot` if this simple
  3268.  solution is found inadequate.
  3269.  
  3270.  Examples:
  3271.        set dgrid3d 10,10,1     # defaults
  3272.        set dgrid3d ,,4
  3273.  
  3274.  The first specifies that a grid of size 10 by 10 is to be constructed using
  3275.  the L2 norm (a norm of 2 is to be used in the distance computation).  The
  3276.  second only modifies the norm to be used to L4.
  3277.  
  3278.  
  3279. 
  3280. File: gnuplot.info, Node: dummy, Prev: dgrid3d, Up: set-show, Next: encoding
  3281.  
  3282.  The `set dummy` command changes the default dummy variable names.
  3283.  
  3284.  Syntax:
  3285.        set dummy {<dummy-var>} {,<dummy-var>}
  3286.        show dummy
  3287.  
  3288.  By default, `gnuplot` (*note gnuplot:: ) assumes that the independent, or
  3289.  "dummy", variable for the `plot` (*note plot:: ) command is "t" if in
  3290.  parametric or polar mode, or "x" otherwise. Similarly the independent
  3291.  variables for the `splot` (*note splot:: ) command are "u" and "v" in
  3292.  parametric mode (`splot` cannot be used in polar mode), or "x" and "y"
  3293.  otherwise.
  3294.  
  3295.  It may be more convenient to call a dummy variable by a more physically
  3296.  meaningful or conventional name.  For example, when plotting time functions:
  3297.  
  3298.        set dummy t
  3299.        plot sin(t), cos(t)
  3300.  
  3301.  At least one dummy variable must be set on the command; `set dummy` by itself
  3302.  will generate an error message.
  3303.  
  3304.  Examples:
  3305.        set dummy u,v
  3306.        set dummy ,s
  3307.  
  3308.  The second example sets the second variable to s.
  3309.  
  3310. 
  3311. File: gnuplot.info, Node: encoding, Prev: dummy, Up: set-show, Next: format
  3312.  
  3313.  The `set encoding` command selects a character encoding.  Valid values are
  3314.  `default`, which does nothing; `iso_8859_1` (known in the PostScript world as
  3315.  `ISO-Latin1`), which is used on many Unix workstations and with MS-Windows;
  3316.  `cp850`, for OS/2; and `cp437`, for MS-DOS.
  3317.  
  3318.  Syntax:
  3319.        set encoding <value>
  3320.        show encoding
  3321.  
  3322.  Please note that this is not supported on all terminal types.  Note also that
  3323.  the device must be able to produce the non-standard characters.
  3324.  
  3325. 
  3326. File: gnuplot.info, Node: format, Prev: encoding, Up: set-show, Next: function style
  3327.  
  3328.  The format of the tic-mark labels can be set with the `set format` command.
  3329.  
  3330.  Syntax:
  3331.        set format {<axes>} {"<format-string>"}
  3332.        set format {<axes>} {'<format-string>'}
  3333.        show format
  3334.  
  3335.  where <axes> is either `x`, `y`, `z`, `xy`, `x2`, `y2` or nothing (which is
  3336.  the same as `xy`).  The length of the string representing a ticmark (after
  3337.  formatting with 'printf') is restricted to 100 characters.  If the format
  3338.  string is omitted, the format will be returned to the default "%g".  For
  3339.  LaTeX users, the format "$%g$" is often desirable.  If the empty string "" is
  3340.  used, no label will be plotted with each tic, though the tic mark will still
  3341.  be plotted.  To eliminate all tic marks, use `set noxtics` (*note xtics:: ) or
  3342.   `set noytics` (*note ytics:: ).
  3343.  
  3344.  Newline (\n) is accepted in the format string.  Use double-quotes rather than
  3345.  single-quotes to enable such interpretation.  See also `syntax`
  3346.  (*note Syntax:: ).
  3347.  
  3348.  The default format for both axes is "%g", but other formats such as "%.2f" or
  3349.  "%3.0em" are often desirable.  Anything accepted by 'printf' when given a
  3350.  double precision number, and accepted by the terminal, will work.  Some other
  3351.  options have been added.  If the format string looks like a floating point
  3352.  format, then `gnuplot` (*note gnuplot:: ) tries to construct a reasonable
  3353.  format.
  3354.  
  3355.  Characters not preceded by "%" are printed verbatim.  Thus you can include
  3356.  spaces and labels in your format string, such as "%g m", which will put " m"
  3357.  after each number.  If you want "%" itself, double it: "%g %%".
  3358.  
  3359.  The acceptable formats (if not in date/time mode) are:
  3360.  
  3361.        Format       Explanation
  3362.        %f           floating point notation
  3363.        %e or %E     exponential notation; an "e" or "E" before the power
  3364.        %g or %G     the shorter of %e (or %E) and %f
  3365.        %x or %X     hex
  3366.        %o or %O     octal
  3367.        %t           mantissa to base 10
  3368.        %l           mantissa to base of current logscale
  3369.        %s           mantissa to base of current logscale; scientific power
  3370.        %T           power to base 10
  3371.        %L           power to base of current logscale
  3372.        %S           scientific power
  3373.        %c           character replacement for scientific power
  3374.        %P           multiple of pi
  3375.  
  3376.  A 'scientific' power is one such that the exponent is a multiple of three.
  3377.  Character replacement of scientific powers (`"%c"`) has been implemented
  3378.  for powers in the range -18 to +18.  For numbers outside of this range the
  3379.  format reverts to exponential.
  3380.  
  3381.  Other acceptable modifiers (which come after the "%" but before the format
  3382.  specifier) are "-", which left-justifies the number; "+", which forces all
  3383.  numbers to be explicitly signed; "#", which places a decimal point after
  3384.  floats that have only zeroes following the decimal point; a positive integer,
  3385.  which defines the field width; "0" (the digit, not the letter) immediately
  3386.  preceding the field width, which indicates that leading zeroes are to be used
  3387.  instead of leading blanks; and a decimal point followed by a non-negative
  3388.  integer, which defines the precision (the minimum number of digits of an
  3389.  integer, or the number of digits following the decimal point of a float).
  3390.  
  3391.  Some releases of 'printf' may not support all of these modifiers but may also
  3392.  support others; in case of doubt, check the appropriate documentation and
  3393.  then experiment.
  3394.  
  3395.  Examples:
  3396.        set format y "%t"; set ytics (5,10)          # "5.0" and "1.0"
  3397.        set format y "%s"; set ytics (500,1000)      # "500" and "1.0"
  3398.        set format y "+-12.3f"; set ytics(12345)     # "+12345.000  "
  3399.        set format y "%.2t*10^%+03T"; set ytic(12345)# "1.23*10^+04"
  3400.        set format y "%s*10^{%S}"; set ytic(12345)   # "12.345*10^{3}"
  3401.        set format y "%s %cg"; set ytic(12345)       # "12.345 kg"
  3402.        set format y "%.0P pi"; set ytic(6.283185)   # "2 pi"
  3403.        set format y "%.0P%%"; set ytic(50)          # "50%"
  3404.  
  3405.        set log y 2; set format y '%l'; set ytics (1,2,3)
  3406.        #displays "1.0", "1.0" and "1.5" (since 3 is 1.5 * 2^1)
  3407.  
  3408.  There are some problem cases that arise when numbers like 9.999 are printed
  3409.  with a format that requires both rounding and a power.
  3410.  
  3411.  If the data type for the axis is date/time, the format string must contain
  3412.  valid codes for the 'strftime' function (outside of `gnuplot`, type "man
  3413.  strftime").  See `set timefmt` (*note timefmt:: ) for a list of the allowed
  3414.  input format codes.
  3415.  
  3416.  In date/time mode, the acceptable formats are:
  3417.  
  3418.        Format       Explanation
  3419.        %a           abbreviated name of day of the week
  3420.        %A           full name of day of the week
  3421.        %b or %h     abbreviated name of the month
  3422.        %B           full name of the month
  3423.        %d           day of the month, 1--31
  3424.        %D           shorthand for "%m/%d/%y"
  3425.        %H or %k     hour, 0--24
  3426.        %I or %l     hour, 0--12
  3427.        %j           day of the year, 1--366
  3428.        %m           month, 1--12
  3429.        %M           minute, 0--60
  3430.        %p           "am" or "pm"
  3431.        %r           shorthand for "%I:%M:%S %p"
  3432.        %R           shorthand for %H:%M"
  3433.        %S           second, 0--60
  3434.        %T           shorthand for "%H:%M:%S"
  3435.        %U           week of the year (week starts on Sunday)
  3436.        %w           day of the week, 0--6 (Sunday = 0)
  3437.        %W           week of the year (week starts on Monday)
  3438.        %y           year, 0-99
  3439.        %Y           year, 4-digit
  3440.  
  3441.  Except for the non-numerical formats, these may be preceded by a "0" ("zero",
  3442.  not "oh") to pad the field length with leading zeroes, and a positive digit,
  3443.  to define the minimum field width (which will be overridden if the specified
  3444.  width is not large enough to contain the number).  There is a 24-character
  3445.  limit to the length of the printed text; longer strings will be truncated.
  3446.  
  3447.  Examples:
  3448.  
  3449.  Suppose the text is "76/12/25 23:11:11".  Then
  3450.        set format x                 # defaults to "12/25/76" \n "23:11"
  3451.        set format x "%A, %d %b %Y"  # "Saturday, 25 Dec 1976"
  3452.        set format x "%r %d"         # "11:11:11 pm 12/25/76"
  3453.  
  3454.  Suppose the text is "98/07/06 05:04:03".  Then
  3455.        set format x "%1y/%2m/%3d %01H:%02M:%03S"  # "98/ 7/  6 5:04:003"
  3456.  
  3457.  See also `set xtics` for more information about tic labels.
  3458.  
  3459. 
  3460. File: gnuplot.info, Node: function style, Prev: format, Up: set-show, Next: functions
  3461.  
  3462.  The `set function style` command changes the default plotting style for
  3463.  function plots.
  3464.  
  3465.  Syntax:
  3466.        set function style <style-choice>
  3467.        show function style
  3468.  
  3469.  See `set style` (*note style:: ) for the choices.  If no choice is given, the
  3470.  choices are listed.  `show function style` shows the current default function
  3471.  plotting style.
  3472.  
  3473.  
  3474. 
  3475. File: gnuplot.info, Node: functions, Prev: function style, Up: set-show, Next: grid
  3476.  
  3477.  The `show functions` command lists all user-defined functions and their
  3478.  definitions.
  3479.  
  3480.  Syntax:
  3481.        show functions
  3482.  
  3483.  For information about the definition and usage of functions in `gnuplot`
  3484.  (*note gnuplot:: ), please see `expressions` (*note Expressions:: ) and
  3485.   `user-defined` (*note User-defined:: ).
  3486.  
  3487.  
  3488. 
  3489. File: gnuplot.info, Node: grid, Prev: functions, Up: set-show, Next: hidden3d
  3490.  
  3491.  The `set grid` command allows grid lines to be drawn on the plot.
  3492.  
  3493.  Syntax:
  3494.        set grid {{no}{m}xtics} {{no}{m}ytics} {{no}{m}ztics}
  3495.                 {{no}{m}x2tics} {{no}{m}y2tics}
  3496.                 {polar {<angle>}} {<major_linetype> {<minor_linetype>}}
  3497.        set nogrid
  3498.        show grid
  3499.  
  3500.  The grid can be enabled and disabled for the major and/or minor tic marks on
  3501.  any axis, and the linetype can be specified for major and minor grid lines.
  3502.  But note that <major_linetype> and <minor_linetype> are indices in the
  3503.  default linetype list provided by the terminal; user-defined linetypes (via
  3504.  the `set linestyle` (*note linestyle:: ) command) are not accessible for grid
  3505.  lines.
  3506.  
  3507.  Additionally, a polar grid can be selected for 2-d plots---circles are drawn
  3508.  to intersect the selected tics, and radial lines are drawn at definable
  3509.  intervals.  (The interval is given in degrees or radians ,depending on the
  3510.  `set angles` (*note angles:: ) setting.)  Note that a polar grid is no longer
  3511.  automatically generated in polar mode.
  3512.  
  3513.  The pertinent tics must be enabled before `set grid` can draw them; `gnuplot`
  3514.  (*note gnuplot:: ) will quietly ignore instructions to draw grid lines at
  3515.  non-existent tics, but they will appear if the tics are subsequently enabled.
  3516.  
  3517.  If no linetype is specified for the minor gridlines, the same linetype as the
  3518.  major gridlines is used.  The default polar angle is 30 degrees.
  3519.  
  3520.  Z grid lines are drawn on the back of the plot.  This looks better if a
  3521.  partial box is drawn around the plot---see `set border` (*note border:: ).
  3522.  
  3523.  
  3524. 
  3525. File: gnuplot.info, Node: hidden3d, Prev: grid, Up: set-show, Next: isosamples
  3526.  
  3527.  The `set hidden3d` command enables hidden line removal for explicit surface
  3528.  plotting (see `splot` (*note splot:: )).
  3529.  
  3530.  Syntax:
  3531.        set hidden3d
  3532.        set nohidden3d
  3533.        show hidden3d
  3534.  
  3535.  Hidden line removal may be used for both explicit functions and for explicit
  3536.  data.  It now works for parametric surfaces as well.  This mode is meaningful
  3537.  only when surfaces are `splot`ted `with lines`.
  3538.  
  3539.  When this flag is set, both the hidden portion of the surface and possibly
  3540.  its hidden contours (see `set contour` (*note contour:: )) as well as the
  3541.  hidden grid will be removed.  Each surface has its hidden parts removed with
  3542.  respect to itself and to other surfaces, if more than one surface is
  3543.  plotted.  But contours drawn on the surface (`set contour surface`) don't seem
  3544.  to work.  Labels and arrows are always visible and are unaffected.
  3545.  
  3546.  
  3547. 
  3548. File: gnuplot.info, Node: isosamples, Prev: hidden3d, Up: set-show, Next: key
  3549.  
  3550.  The isoline density of surfaces may be changed by the `set isosamples`
  3551.  command.
  3552.  
  3553.  Syntax:
  3554.        set isosamples <iso_1> {,<iso_2>}
  3555.        show isosamples
  3556.  
  3557.  Each surface plot will have <iso_1> iso-u lines and <iso_2> iso-v lines.  If
  3558.  you only specify <iso_1>, <iso_2> will be set to the same value as <iso_1>.
  3559.  By default, sampling is set to 10 isolines per u or v axis.  A higher
  3560.  sampling rate will produce more accurate plots, but will take longer.  These
  3561.  parameters have no effect on data file plotting.
  3562.  
  3563.  An isoline is a curve parameterized by one of the surface parameters while
  3564.  the other surface parameter is fixed.  Isolines provide a simple means to
  3565.  display a surface.  By fixing the u parameter of surface s(u,v), the iso-u
  3566.  lines of the form c(v) = s(u0,v) are produced, and by fixing the v parameter,
  3567.  the iso-v lines of the form c(u) = s(u,v0) are produced.
  3568.  
  3569.  When a surface plot is being done without the removal of hidden lines, `set
  3570.  samples` also has an effect on the number of points being evaluated---it
  3571.  controls the number of points sampled along each isoline.  See `set samples`
  3572.  (*note samples:: ).
  3573.  
  3574.  
  3575. 
  3576. File: gnuplot.info, Node: key, Prev: isosamples, Up: set-show, Next: label
  3577.  
  3578.  The `set key` enables a key (or legend) describing plots on a plot.
  3579.  
  3580.  The contents of the key, i.e., the names given to each plotted data set and
  3581.  function and samples of the lines and/or symbols used to represent them, are
  3582.  determined by the `title` (*note title:: ) and  `with` (*note with:: ) options
  3583.  of the {s}s`}`plot` (*note plot:: ) command. Please see `plot title` and `plot
  3584.  with` for more information.
  3585.  
  3586.  Syntax:
  3587.        set key {  left | right | top | bottom | outside | below
  3588.                 | <position>}
  3589.                {Left | Right} {{no}reverse}
  3590.                {samplen <sample_length>} {spacing <vertical_spacing>}
  3591.                {width <width_increment>}
  3592.                {title "<text>"} {{no}box {<linetype>}}
  3593.        set nokey
  3594.        show key
  3595.  
  3596.  By default the key is placed in the upper right corner of the graph.  The
  3597.  keywords `left`, `right`, `top`, `bottom`, `outside` and `below` may be used
  3598.  to place the key in the other corners inside the graph or to the right
  3599.  (outside) or below the graph.  They may be given alone or combined.
  3600.  
  3601.  Justification of the labels within the key is controlled by `Left` or `Right`
  3602.  (default is `Right`).  The text and sample can be reversed (`reverse`) and a
  3603.  box can be drawn around the key (`box {<linetype>}`) in a specified linetype.
  3604.  But note that <linetype> is an index in the default linetype list provided by
  3605.  the terminal; user-defined linetypes (via the `set linestyle`
  3606.  (*note linestyle:: ) command) are not accessible for the key box.
  3607.  
  3608.  The length of the sample line can be controlled by `samplen`.  The sample
  3609.  length is computed as the sum of the tic length and <sample_length> times the
  3610.  character width.  `samplen` also affects the positions of point samples in
  3611.  the key since these are drawn at the midpoint of the sample line, even if it
  3612.  is not drawn.  <sample_length> must be an integer.
  3613.  
  3614.  The vertical spacing between lines is controlled by `spacing`.  The spacing
  3615.  is set equal to the product of the pointsize, the vertical tic size, and
  3616.  <vertical_spacing>.  The program will guarantee that the vertical spacing is
  3617.  no smaller than the character height.
  3618.  
  3619.  The <width_increment> is a number of character widths to be added to or
  3620.  subtracted from the length of the string.  This is useful only when you are
  3621.  putting a box around the key and you are using control characters in the text.
  3622.  `gnuplot` (*note gnuplot:: ) simply counts the number of characters in the
  3623.  string when computing the box width; this allows you to correct it.
  3624.  
  3625.  A title can be put on the key (`title "<text>"`)---see also `syntax`
  3626.  (*note Syntax:: ) for the distinction between text in single- or
  3627.  double-quotes.  The key title uses the same justification as do the plot
  3628.  titles.
  3629.  
  3630.  The defaults for `set key` are `right`, `top`, `Right`, `noreverse`, `samplen
  3631.  4`, `spacing 1.25`, `title ""`, and `nobox`.  The default <linetype> is the
  3632.  same as that used for the plot borders.  Entering `set key` with no options
  3633.  returns the key to its default configuration.
  3634.  
  3635.  The <position> can be a simple x,y,z as in previous versions, but these can
  3636.  be preceded by one of four keywords (`first`, `second`, `graph`, `screen`)
  3637.  which selects the coordinate system in which the position is specified.  See
  3638.  `coordinates` (*note Coordinates:: ) for more details.
  3639.  
  3640.  The key is drawn as a sequence of lines, with one plot described on each
  3641.  line.  On the right-hand side (or the left-hand side, if `reverse` is
  3642.  selected) of each line is a representation that attempts to mimic the way the
  3643.  curve is plotted.  On the other side of each line is the text description
  3644.  (the line title), obtained from the `plot` command.  The lines are vertically
  3645.  arranged so that an imaginary straight line divides the left- and right-hand
  3646.  sides of the key.  It is the coordinates of the top of this line that are
  3647.  specified with the `set key` command.  In a `plot`, only the x and y
  3648.  coordinates are used to specify the line position.  For a `splot`
  3649.  (*note splot:: ), x, y and z are all used as a 3-d location mapped using the
  3650.  same mapping as the graph itself to form the required 2-d screen position of
  3651.  the imaginary line.
  3652.  
  3653.  Some or all of the key may be outside of the graph boundary, although this
  3654.  may interfere with other labels and may cause an error on some devices.  If
  3655.  you use the keywords `outside` or `below`, `gnuplot` makes space for the keys
  3656.  and the graph becomes smaller.  Putting keys outside to the right, they
  3657.  occupy as few columns as possible, and putting them below, as many columns as
  3658.  possible (depending of the length of the labels), thus stealing as little
  3659.  space from the graph as possible.
  3660.  
  3661.  When using the TeX or PostScript drivers, or similar drivers where formatting
  3662.  information is embedded in the string, `gnuplot` is unable to calculate
  3663.  correctly the width of the string for key positioning.  If the key is to be
  3664.  positioned at the left, it may be convenient to use the combination  `set key
  3665.  left Left reverse`.  The box and gap in the grid will be the width of the
  3666.  literal string.
  3667.  
  3668.  If `splot` is being used to draw contours, the contour labels will be listed
  3669.  in the key.  If the alignment of these labels is poor or a different number
  3670.  of decimal places is desired, the label format can be specified.  See `set
  3671.  clabel` for details.
  3672.  
  3673.  Examples:
  3674.  
  3675.  This places the key at the default location:
  3676.        set key
  3677.  
  3678.  This disables the key:
  3679.        set nokey
  3680.  
  3681.  This places a key at coordinates 2,3.5,2 in the default (first) coordinate
  3682.  system:
  3683.        set key 2,3.5,2
  3684.  
  3685.  This places the key below the graph:
  3686.        set key below
  3687.  
  3688.  This places the key in the bottom left corner, left-justifies the text,
  3689.  gives it a title, and draws a box around it in linetype 3:
  3690.        set key left bottom Left title 'Legend' box 3
  3691.  
  3692. 
  3693. File: gnuplot.info, Node: label, Prev: key, Up: set-show, Next: linestyle
  3694.  
  3695.  Arbitrary labels can be placed on the plot using the `set label` command.
  3696.  
  3697.  Syntax:
  3698.        set label {<tag>} {"<label_text>"} {at <position>}
  3699.                  {<justification>} {{no}rotate} {font "<name><,size>"}
  3700.        set nolabel {<tag>}
  3701.        show label
  3702.  
  3703.  The <position> is specified by either x,y or x,y,z, and may be preceded by
  3704.  `first`, `second`, `graph`, or `screen` to select the coordinate system.
  3705.  See `coordinates` (*note Coordinates:: ) for details.
  3706.  
  3707.  The tag is an integer that is used to identify the label. If no <tag> is
  3708.  given, the lowest unused tag value is assigned automatically.  The tag can be
  3709.  used to delete or modify a specific label.  To change any attribute of an
  3710.  existing label, use the `set label` command with the appropriate tag, and
  3711.  specify the parts of the label to be changed.
  3712.  
  3713.  By default, the text is placed flush left against the point x,y,z.  To adjust
  3714.  the way the label is positioned with respect to the point x,y,z, add the
  3715.  parameter <justification>, which may be `left`, `right` or `center`,
  3716.  indicating that the point is to be at the left, right or center of the text.
  3717.  Labels outside the plotted boundaries are permitted but may interfere with
  3718.  axis labels or other text.
  3719.  
  3720.  If `rotate` (*note rotate:: ) is given, the label is written vertically (if
  3721.  the terminal can do so, of course).
  3722.  
  3723.  If one (or more) axis is timeseries, the appropriate coordinate should be
  3724.  given as a quoted time string according to the `timefmt` (*note timefmt:: )
  3725.  format string.  See `set xdata` (*note xdata:: ) and set timefmt.
  3726.  
  3727.  The EEPIC, Imagen, LaTeX, and TPIC drivers allow \\ in a string to specify
  3728.  a newline.
  3729.  
  3730.  Examples:
  3731.  
  3732.  To set a label at (1,2) to "y=x", use:
  3733.        set label "y=x" at 1,2
  3734.  
  3735.  To set a label of the sign Sigma of size 24 at the center of the graph, use:
  3736.        set label "S" at graph 0.5,0.5 center font "Symbol,24"
  3737.  
  3738.  To set a label "y=x^2" with the right of the text at (2,3,4), and tag the
  3739.  label as number 3, use:
  3740.        set label 3 "y=x^2" at 2,3,4 right
  3741.  
  3742.  To change the preceding label to center justification, use:
  3743.        set label 3 center
  3744.  
  3745.  To delete label number 2, use:
  3746.        set nolabel 2
  3747.  
  3748.  To delete all labels, use:
  3749.        set nolabel
  3750.  
  3751.  To show all labels (in tag order), use:
  3752.        show label
  3753.  
  3754.  To set a label on a graph with a timeseries on the x axis, use, for example:
  3755.        set timefmt "%d/%m/%y,%H:%M"
  3756.        set label "Harvest" at "25/8/93",1
  3757.  
  3758. 
  3759. File: gnuplot.info, Node: linestyle, Prev: label, Up: set-show, Next: lmargin
  3760.  
  3761.  Each terminal has a default set of line and point types, which can be seen
  3762.  by using the command `test` (*note test:: ).  set linestyle defines a set of
  3763.  line types and widths and point types and sizes so that you can refer to them
  3764.  later by an index instead of repeating all the information at each
  3765.  invocation.
  3766.  
  3767.  Syntax:
  3768.        set linestyle <index> {linetype | lt <line_type>}
  3769.                              {linewidth | lw <line_width>}
  3770.                              {pointtype | pt <point_type>}
  3771.                              {pointsize | ps <point_size>}
  3772.        set nolinestyle
  3773.        show linestyle
  3774.  
  3775.  The line and point types are taken from the default types for the terminal
  3776.  currently in use.  The line width and point size are multipliers for the
  3777.  default width and size (but note that <point_size> here is unaffected by
  3778.  the multiplier given on 'set pointsize').
  3779.  
  3780.  The defaults for the line and point types is the index.  The defaults for
  3781.  the width and size are both unity.
  3782.  
  3783.  Linestyles created by this mechanism do not replace the default styles;
  3784.  both may be used.
  3785.  
  3786.  Not all terminals support the line width and point size features, so these
  3787.  terminals obviously cannot fully support `set linestyle`.
  3788.  
  3789.  Note that this feature is not completely installed; linestyles defined by
  3790.  this mechanism may be used with 'plot', 'splot', 'replot', and 'set arrow',
  3791.  but not by other commands that allow the default index to be used, such as
  3792.  'set grid'.
  3793.  
  3794.  Example:
  3795.  Suppose that the default lines for indices 1, 2, and 3 are red, green, and
  3796.  blue, respectively, and the default point shapes for the same indices are a
  3797.  square, a cross, and a triangle, respectively.  Then
  3798.  
  3799.        set linestyle 1 lt 2 lw 2 pt 3 ps 0.5
  3800.  
  3801.  defines a new linestyle that is green and twice the default width and a new
  3802.  pointstyle that is a half-sized triangle.  The commands
  3803.  
  3804.        set function style lines
  3805.        plot f(x) lt 3, g(x) ls 1
  3806.  
  3807.  will create a plot of f(x) using the default blue line and a plot of g(x)
  3808.  using the user-defined wide green line.  Similarly the commands
  3809.  
  3810.        set function style linespoints
  3811.        plot p(x) lt 1 pt 3, q(x) ls 1
  3812.  
  3813.  will create a plot of f(x) using the default triangles connected by a red
  3814.  line and q(x) using small triangles connected by a green line.
  3815.  
  3816. 
  3817. File: gnuplot.info, Node: lmargin, Prev: linestyle, Up: set-show, Next: locale
  3818.  
  3819.  The command `set lmargin` sets the size of the left margin.  Please see
  3820.  `set margin` (*note margin:: ) for details.
  3821.  
  3822.  
  3823. 
  3824. File: gnuplot.info, Node: locale, Prev: lmargin, Up: set-show, Next: logscale
  3825.  
  3826.  The `locale` setting determines the language with which `{x,y,z}{d,m}tics`
  3827.  will write the days and months.
  3828.  
  3829.  Syntax:
  3830.        set locale {"<locale>"}
  3831.  
  3832.  <locale> may be any language designation acceptable to your installation.
  3833.  See your system documentation for the available options.  The default value
  3834.  is determined from the LANG environment variable.
  3835.  
  3836. 
  3837. File: gnuplot.info, Node: logscale, Prev: locale, Up: set-show, Next: mapping
  3838.  
  3839.  Log scaling may be set on the x, y, z, x2 and/or y2 axes.
  3840.  
  3841.  Syntax:
  3842.        set logscale <axes> <base>
  3843.        set nologscale <axes>
  3844.        show logscale
  3845.  
  3846.  where <axes> may be any combinations of `x`, `y`, and `z`, in any order, or
  3847.  `x2` or `y2` and where <base> is the base of the log scaling.  If <base> is
  3848.  not given, then 10 is assumed.  If <axes> is not given, then all axes are
  3849.  assumed.  `set nologscale` turns off log scaling for the specified axes.
  3850.  
  3851.  Examples:
  3852.  
  3853.  To enable log scaling in both x and z axes:
  3854.        set logscale xz
  3855.  
  3856.  To enable scaling log base 2 of the y axis:
  3857.        set logscale y 2
  3858.  
  3859.  To disable z axis log scaling:
  3860.        set nologscale z
  3861.  
  3862. 
  3863. File: gnuplot.info, Node: mapping, Prev: logscale, Up: set-show, Next: margin
  3864.  
  3865.  If data are provided to `splot` (*note splot:: ) in spherical or cylindrical
  3866.  coordinates, the `set mapping` command should be used to instruct `gnuplot`
  3867.  (*note gnuplot:: ) how to interpret them.
  3868.  
  3869.  Syntax:
  3870.        set mapping {cartesian | spherical | cylindrical}
  3871.  
  3872.  A cartesian coordinate system is used by default.
  3873.  
  3874.  For a spherical coordinate system, the data occupy two or three columns (or
  3875.  `using` (*note using:: ) entries).  The first two are interpreted as the polar
  3876.  and azimuthal angles theta and phi (in the units specified by `set angles`
  3877.  (*note angles:: )).  The radius r is taken from the third column if there is
  3878.  one, or is set to unity if there is no third column.  The mapping is:
  3879.  
  3880.        x = r * cos(theta) * cos(phi)
  3881.        y = r * sin(theta) * cos(phi)
  3882.        z = r * sin(phi)
  3883.  
  3884.  Note that this is a "geographic" spherical system, rather than a "polar" one.
  3885.  
  3886.  For a cylindrical coordinate system, the data again occupy two or three
  3887.  columns.  The first two are interpreted as theta (in the units specified by
  3888.  `set angles`) and z.  The radius is either taken from the third column or set
  3889.  to unity, as in the spherical case.  The mapping is:
  3890.  
  3891.        x = r * cos(theta)
  3892.        y = r * sin(theta)
  3893.        z = z
  3894.  
  3895.  The effects of `mapping` can be duplicated with the `using` filter on the
  3896.  `splot` command, but `mapping` may be more convenient if many data files are
  3897.  to be processed.  However even if `mapping` is used, `using` may still be
  3898.  necessary if the data in the file are not in the required order.
  3899.  
  3900.  `mapping` has no effect on `plot`s (*note plot:: ).
  3901.  
  3902.  
  3903. 
  3904. File: gnuplot.info, Node: margin, Prev: mapping, Up: set-show, Next: missing
  3905.  
  3906.  Normally the margins of the plot are automatically calculated based on tics
  3907.  and axis labels.  These computed values can be overridden by the `set margin`
  3908.  commands.  `show margin` shows the current settings.
  3909.  
  3910.  Syntax:
  3911.        set bmargin {<margin>}
  3912.        set lmargin {<margin>}
  3913.        set rmargin {<margin>}
  3914.        set tmargin {<margin>}
  3915.        show margin
  3916.  
  3917.  The units of <margin> are character heights or widths, as appropriate.  A
  3918.  positive value defines the absolute size of the margin.  A negative value (or
  3919.  none) causes `gnuplot` (*note gnuplot:: ) to revert to the computed value.
  3920.  
  3921.  
  3922. 
  3923. File: gnuplot.info, Node: missing, Prev: margin, Up: set-show, Next: multiplot
  3924.  
  3925.  The `set missing` command allows you to tell `gnuplot` (*note gnuplot:: ) what
  3926.  character is used in a data file to denote missing data.
  3927.  
  3928.  Syntax:
  3929.        set missing {"<character>"}
  3930.        show missing
  3931.  
  3932.  Example:
  3933.        set missing "?"
  3934.  
  3935.  would mean that, when plotting a file containing
  3936.  
  3937.           1 1
  3938.           2 ?
  3939.           3 2
  3940.  
  3941.  the middle line would be ignored.
  3942.  
  3943.  There is no default character for `missing`.
  3944.  
  3945. 
  3946. File: gnuplot.info, Node: multiplot, Prev: missing, Up: set-show, Next: mx2tics
  3947.  
  3948.  The command `set multiplot` places `gnuplot` (*note gnuplot:: ) in the
  3949.  multiplot mode, in which several plots are placed on the same page, window, or
  3950.  screen.
  3951.  
  3952.  Syntax:
  3953.        set multiplot
  3954.        set nomultiplot
  3955.  
  3956.  For some terminals, no plot is displayed until the command `set nomultiplot`
  3957.  is given, which causes the entire page to be drawn and then returns `gnuplot`
  3958.  to its normal single-plot mode.  For other terminals, each separate `plot`
  3959.  (*note plot:: ) command produces a plot, but the screen may not be cleared
  3960.  between plots.
  3961.  
  3962.  Any labels or arrows that have been defined will be drawn for each plot
  3963.  according to the current size and origin (unless their coordinates are
  3964.  defined in the `screen` system).  Just about everything else that can be
  3965.  `set` (*note set-show:: ) is applied to each plot, too.  If you want something
  3966.  to appear only once on the page, for instance a single time stamp, you'll need
  3967.  to put a `set time`/`set notime` pair around one of the `plot`, `splot`
  3968.  (*note splot:: ) or  `replot` (*note replot:: ) commands within the `set
  3969.  multiplot`/`set nomultiplot` block.
  3970.  
  3971.  The commands `set origin` (*note origin:: ) and  `set size` (*note size:: )
  3972.  must be used to correctly position each plot; see `set origin` and `set size`
  3973.  for details of their usage.
  3974.  
  3975.  Example:
  3976.        set size 0.7,0.7
  3977.        set origin 0.1,0.1
  3978.        set multiplot
  3979.        set size 0.4,0.4
  3980.        set origin 0.1,0.1
  3981.        plot sin(x)
  3982.        set size 0.2,0.2
  3983.        set origin 0.5,0.5
  3984.        plot cos(x)
  3985.        set nomultiplot
  3986.  
  3987.  displays a plot of cos(x) stacked above a plot of sin(x).  Note the initial
  3988.  `set size` and `set origin`.  While these are not always required, their
  3989.  inclusion is recommended.  Some terminal drivers require that bounding box
  3990.  information be available before any plots can be made, and the form given
  3991.  above guarantees that the bounding box will include the entire plot array
  3992.  rather than just the bounding box of the first plot.
  3993.  
  3994.  `set size` and `set origin` refer to the entire plotting area used for each
  3995.  plot.  If you want to have the axes themselves line up, perhaps to avoid
  3996.  having to label all of them, you need to guarantee that the margins are the
  3997.  same size.  This can be done with the `set margin` (*note margin:: )
  3998.  commands.  Please see set margin` for their use.
  3999.  
  4000.  
  4001. 
  4002. File: gnuplot.info, Node: mx2tics, Prev: multiplot, Up: set-show, Next: mxtics
  4003.  
  4004.  Minor tic marks along the x2 (top) axis are controlled by `set mx2tics`.
  4005.  Please see `set mxtics` (*note mxtics:: ).
  4006.  
  4007.  
  4008. 
  4009. File: gnuplot.info, Node: mxtics, Prev: mx2tics, Up: set-show, Next: my2tics
  4010.  
  4011.  Minor tic marks along the x axis are controlled by `set mxtics`.  They can be
  4012.  turned off with `set nomxtics`.  Similar commands control minor tics along
  4013.  the other axes.
  4014.  
  4015.  Syntax:
  4016.        set mxtics {<freq> | default}
  4017.        set nomxtics
  4018.        show mxtics
  4019.  
  4020.  The same syntax applies to `mytics` (*note mytics:: ),  `mztics`
  4021.  (*note mztics:: ),  `mx2tics` (*note mx2tics:: ) and  `my2tics`
  4022.  (*note my2tics:: ).
  4023.  
  4024.  <freq> is the number of sub-intervals (NOT the number of minor tics) between
  4025.  major tics (ten is the default for a linear axis, so there are nine minor
  4026.  tics between major tics). Selecting `default` will return the number of minor
  4027.  ticks to its default value.
  4028.  
  4029.  If the axis is logarithmic, the number of sub-intervals will be set to a
  4030.  reasonable number by default (based upon the length of a decade).  This will
  4031.  be overridden if <freq> is given.  However the usual minor tics (2, 3, ...,
  4032.  8, 9 between 1 and 10, for example) are obtained by setting <freq> to 10,
  4033.  even though there are but nine sub-intervals.
  4034.  
  4035.  Minor tics can be used only with uniformly spaced major tics.  Since major
  4036.  tics can be placed arbitrarily by `set {x|x2|y|y2|z}tics`, minor tics cannot
  4037.  be used if major tics are explicitly `set` (*note set-show:: ).
  4038.  
  4039.  By default, minor tics are off for linear axes and on for logarithmic axes.
  4040.  They inherit the settings for `axis|border` and `{no}mirror` specified for
  4041.  the major tics.  Please see `set xtics` (*note xtics:: ) for information about
  4042.  these.
  4043.  
  4044.  
  4045. 
  4046. File: gnuplot.info, Node: my2tics, Prev: mxtics, Up: set-show, Next: mytics
  4047.  
  4048.  Minor tic marks along the y2 (right-hand) axis are controlled by `set
  4049.  my2tics`.  Please see `set mxtics` (*note mxtics:: ).
  4050.  
  4051.  
  4052. 
  4053. File: gnuplot.info, Node: mytics, Prev: my2tics, Up: set-show, Next: mztics
  4054.  
  4055.  Minor tic marks along the y axis are controlled by `set mytics`.  Please
  4056.  see `set mxtics` (*note mxtics:: ).
  4057.  
  4058.  
  4059. 
  4060. File: gnuplot.info, Node: mztics, Prev: mytics, Up: set-show, Next: offsets
  4061.  
  4062.  Minor tic marks along the z axis are controlled by `set mztics`.  Please
  4063.  see `set mxtics` (*note mxtics:: ).
  4064.  
  4065.  
  4066. 
  4067. File: gnuplot.info, Node: offsets, Prev: mztics, Up: set-show, Next: origin
  4068.  
  4069.  Offsets provide a mechanism to put a boundary around the data inside of an
  4070.  autoscaled graph.
  4071.  
  4072.  Syntax:
  4073.        set offsets <left>, <right>, <top>, <bottom>
  4074.        set nooffsets
  4075.        show offsets
  4076.  
  4077.  Each offset may be a constant or an expression.  Each defaults to 0.  Left
  4078.  and right offsets are given in units of the x axis, top and bottom offsets in
  4079.  units of the y axis.  A positive offset expands the graph in the specified
  4080.  direction, e.g., a positive bottom offset makes ymin more negative.  Negative
  4081.  offsets, while permitted, can have unexpected interactions with autoscaling
  4082.  and clipping.
  4083.  
  4084.  Offsets are ignored in `splot`s (*note splot:: ).
  4085.  
  4086.  Example:
  4087.        set offsets 0, 0, 2, 2
  4088.        plot sin(x)
  4089.  
  4090.  This graph of sin(x) will have a y range [-3:3] because the function
  4091.  will be autoscaled to [-1:1] and the vertical offsets are each two.
  4092.  
  4093. 
  4094. File: gnuplot.info, Node: origin, Prev: offsets, Up: set-show, Next: output
  4095.  
  4096.  The `set origin` command is used to specify the origin of a plotting surface
  4097.  (i.e., the graph and its margins) on the screen.  The coordinates are given
  4098.  in the `screen` coordinate system (see `coordinates` (*note Coordinates:: )
  4099.  for information about this system).
  4100.  
  4101.  Syntax:
  4102.        set origin <x-origin>,<y-origin>
  4103.  
  4104. 
  4105. File: gnuplot.info, Node: output, Prev: origin, Up: set-show, Next: parametric
  4106.  
  4107.  By default, screens are displayed to the standard output. The `set output`
  4108.  command redirects the display to the specified file or device.
  4109.  
  4110.  Syntax:
  4111.        set output {"<filename>"}
  4112.        show output
  4113.  
  4114.  The filename must be enclosed in quotes.  If the filename is omitted, any
  4115.  output file opened by a previous invocation of `set output` will be closed
  4116.  and new output will be sent to STDOUT.  (If you give the command `set output
  4117.  "STDOUT"`, your output may be sent to a file named "STDOUT"!  ["May be", not
  4118.  "will be", because some terminals, like `x11` (*note x11:: ), ignore set
  4119.  output.])
  4120.  
  4121.  MSDOS users should note that the \ character has special significance in
  4122.  double-quoted strings, so single-quotes should be used for filenames in
  4123.  different directories.
  4124.  
  4125.  When both `set terminal` (*note terminal:: ) and set output are used together,
  4126.  it is safest to give `set terminal` first, because some terminals set a flag
  4127.  which is needed in some operating systems.  This would be the case, for
  4128.  example, if the operating system needs to know whether or not a file is to be
  4129.  formatted in order to open it properly.
  4130.  
  4131.  On machines with popen functions (Unix), output can be piped through a shell
  4132.  command if the first character of the filename is '|'.  For instance,
  4133.  
  4134.        set output "|lpr -Plaser filename"
  4135.        set output "|lp -dlaser filename"
  4136.  
  4137.  On MSDOS machines, `set output "PRN"` will direct the output to the default
  4138.  printer.  On VMS, output can be sent directly to any spooled device.  It is
  4139.  also possible to send the output to DECnet transparent tasks, which allows
  4140.  some flexibility.
  4141.  
  4142. 
  4143. File: gnuplot.info, Node: parametric, Prev: output, Up: set-show, Next: pointsize
  4144.  
  4145.  The `set parametric` command changes the meaning of `plot` (*note plot:: )
  4146.  ((`splot` (*note splot:: )) from normal functions to parametric
  4147.  functions.  The command `set noparametric` restores the plotting style to
  4148.  normal, single-valued expression plotting.
  4149.  
  4150.  Syntax:
  4151.        set parametric
  4152.        set noparametric
  4153.        show parametric
  4154.  
  4155.  For 2-d plotting, a parametric function is determined by a pair of parametric
  4156.  functions operating on a parameter.  An example of a 2-d parametric function
  4157.  would be `plot sin(t),cos(t)`, which draws a circle (if the aspect ratio is
  4158.  set correctly---see `set size` (*note size:: )).   `gnuplot`
  4159.  (*note gnuplot:: ) will display an error message if both functions are not
  4160.  provided for a parametric `plot`.
  4161.  
  4162.  For 3-d plotting, the surface is described as x=f(u,v), y=g(u,v), z=h(u,v).
  4163.  Therefore a triplet of functions is required.  An example of a 3-d parametric
  4164.  function would be `cos(u)*cos(v),cos(u)*sin(v),sin(u)`, which draws a sphere.
  4165.  `gnuplot` will display an error message if all three functions are not
  4166.  provided for a parametric `splot`.
  4167.  
  4168.  The total set of possible plots is a superset of the simple f(x) style plots,
  4169.  since the two functions can describe the x and y values to be computed
  4170.  separately.  In fact, plots of the type t,f(t) are equivalent to those
  4171.  produced with f(x) because the x values are computed using the identity
  4172.  function.  Similarly, 3-d plots of the type u,v,f(u,v) are equivalent to
  4173.  f(x,y).
  4174.  
  4175.  Note that the order the parametric functions are specified is xfunction,
  4176.  yfunction (and zfunction) and that each operates over the common parametric
  4177.  domain.
  4178.  
  4179.  Also, the `set parametric` function implies a new range of values.  Whereas
  4180.  the normal f(x) and f(x,y) style plotting assume an xrange and yrange (and
  4181.  zrange), the parametric mode additionally specifies a trange, urange, and
  4182.  vrange.  These ranges may be set directly with `set trange` (*note trange:: ),
  4183.   `set urange` (*note urange:: ), and `set vrange` (*note vrange:: ), or by
  4184.  specifying the range on the plot or splot commands.  Currently the default
  4185.  range for these parametric variables is [-5:5].  Setting the ranges to
  4186.  something more meaningful is expected.
  4187.  
  4188.  
  4189. 
  4190. File: gnuplot.info, Node: pointsize, Prev: parametric, Up: set-show, Next: polar
  4191.  
  4192.  The `set pointsize` command changes the size of the points used in plots.
  4193.  
  4194.  Syntax:
  4195.        set pointsize <pointsize>
  4196.        show pointsize
  4197.  
  4198.  Default is pointsize 1.0.  Larger pointsizes (>1.0) are useful for high
  4199.  resolution in bitmapped graphics.
  4200.  
  4201.  The pointsize of a single plot may be changed on the `plot` (*note plot:: )
  4202.  command.  See `plot with` (*note with:: ) for details.
  4203.  
  4204.  Please note that the pointsize setting is not supported with all terminal
  4205.  types.
  4206.  
  4207. 
  4208. File: gnuplot.info, Node: polar, Prev: pointsize, Up: set-show, Next: rmargin
  4209.  
  4210.  The `set polar` command changes the meaning of the plot from rectangular
  4211.  coordinates to polar coordinates.
  4212.  
  4213.  Syntax:
  4214.        set polar
  4215.        set nopolar
  4216.        show polar
  4217.  
  4218.  There have been changes made to polar mode in version 3.6, so that scripts
  4219.  for `gnuplot` (*note gnuplot:: ) versions 3.5 and earlier will require
  4220.  modification.  The main change is that the dummy variable t is used for the
  4221.  angle so that the x and y ranges can be controlled independently.  Other
  4222.  changes are: 1) tics are no longer put along the zero axes automatically
  4223.  ---use `set xtics axis nomirror`; `set ytics axis nomirror`; 2) the grid, if
  4224.  selected, is not automatically polar ---use `set grid polar`; 3) the grid is
  4225.  not labelled with angles ---use `set label` (*note label:: ) as necessary.
  4226.  
  4227.  In polar coordinates, the dummy variable (t) is an angle.  The default range
  4228.  of t is [0:2*pi], or, if degree units have been selected, to [0:360] (see
  4229.  `set angles` (*note angles:: )).
  4230.  
  4231.  The command `set nopolar` changes the meaning of the plot back to the default
  4232.  rectangular coordinate system.
  4233.  
  4234.  The `set polar` command is not supported for `splot`s (*note splot:: ).  See
  4235.  the  `set mapping` (*note mapping:: ) command for similar functionality for
  4236.  `splot`s.
  4237.  
  4238.  While in polar coordinates the meaning of an expression in t is really
  4239.  r = f(t), where t is an angle of rotation.  The trange controls the domain
  4240.  (the angle) of the function, and the x and y ranges control the range of the
  4241.  graph in the x and y directions.  Each of these ranges, as well as the
  4242.  rrange, may be autoscaled or set explicitly.  See `set xrange`
  4243.  (*note xrange:: ) for details of all the `set range` commands.
  4244.  
  4245.  Example:
  4246.        set polar
  4247.        plot t*sin(t)
  4248.        plot [-2*pi:2*pi] [-3:3] [-3:3] t*sin(t)
  4249.  
  4250.  The first `plot` (*note plot:: ) uses the default polar angular domain of 0 to
  4251.  2*pi.  The radius and the size of the graph are scaled automatically.  The
  4252.  second `plot` expands the domain, and restricts the size of the graph to
  4253.  [-3:3] in both directions.
  4254.  
  4255.  You may want to `set size square` to have `gnuplot` try to make the aspect
  4256.  ratio equal to unity, so that circles look circular.
  4257.  
  4258. 
  4259. File: gnuplot.info, Node: rmargin, Prev: polar, Up: set-show, Next: rrange
  4260.  
  4261.  The command `set rmargin` sets the size of the right margin.  Please see
  4262.  `set margin` (*note margin:: ) for details.
  4263.  
  4264.  
  4265. 
  4266. File: gnuplot.info, Node: rrange, Prev: rmargin, Up: set-show, Next: samples
  4267.  
  4268.  The `set rrange` command sets the range of the radial coordinate for a
  4269.  graph in polar mode.  Please see `set xrange` (*note xrange:: ) for details.
  4270.  
  4271.  
  4272. 
  4273. File: gnuplot.info, Node: samples, Prev: rrange, Up: set-show, Next: size
  4274.  
  4275.  The sampling rate of functions may be changed by the `set samples` command.
  4276.  
  4277.  Syntax:
  4278.        set samples <samples_1> {,<samples_2>}
  4279.        show samples
  4280.  
  4281.  By default, sampling is set to 100 points.  A higher sampling rate will
  4282.  produce more accurate plots, but will take longer.  This parameter has no
  4283.  effect on data-file plotting unless one of the `smooth` (*note smooth:: )
  4284.  options is used.
  4285.  
  4286.  When a 2-d graph is being done, only the value of <samples_1> is relevant.
  4287.  
  4288.  When a surface plot is being done without the removal of hidden lines, the
  4289.  value of samples specifies the number of samples that are to be evaluated for
  4290.  isoline.  Each iso-v line will have <sample_1> samples and each iso-u line
  4291.  will have <sample_2> samples.  If you only specify <samples_1>, <samples_2>
  4292.  will be set to the same value as <samples_1>.  See also `set isosamples`
  4293.  (*note isosamples:: ).
  4294.  
  4295.  
  4296. 
  4297. File: gnuplot.info, Node: size, Prev: samples, Up: set-show, Next: style
  4298.  
  4299.  The `set size` command scales the displayed size of the plot.
  4300.  
  4301.  Syntax:
  4302.        set size {{no}square | ratio <r> | noratio} {<xscale>,<yscale>}
  4303.        show size
  4304.  
  4305.  The <xscale> and <yscale> values are the scaling factors for the size of the
  4306.  plot, which includes the graph and the margins.
  4307.  
  4308.  `ratio` causes `gnuplot` (*note gnuplot:: ) to try to create a graph with an
  4309.  aspect ratio of <r> (the ratio of the y-axis length to the x-axis length)
  4310.  within the portion of the plot specified by <xscale> and <yscale>.
  4311.  
  4312.  The meaning of a negative value for <r> is different.  If <r>=-1, gnuplot
  4313.  tries to set the scales so that the unit has the same length on both the x
  4314.  and y axes (suitable for geographical data, for instance).  If <r>=-2, the
  4315.  unit on y has twice the length of the unit on x, and so on.
  4316.  
  4317.  The success of `gnuplot` in producing the requested aspect ratio depends on
  4318.  the terminal selected.  The graph area will be the largest rectangle of
  4319.  aspect ratio <r> that will fit into the specified portion of the output
  4320.  (leaving adequate margins, of course).
  4321.  
  4322.  `square` is a synonym for `ratio 1`.
  4323.  
  4324.  Both `noratio` and `nosquare` return the graph to its default aspect ratio
  4325.  (1.0), but do not return <xscale> or <yscale> to their default values (also
  4326.  1.0).
  4327.  
  4328.  `ratio` and `square` have no effect on 3-d plots.
  4329.  
  4330.  `set size` is relative to the default size, which differs from terminal to
  4331.  terminal.  Since `gnuplot` fills as much of the available plotting area as
  4332.  possible by default, it is safer to use `set size` to decrease the size of
  4333.  a plot than to increase it.  See `set terminal` (*note terminal:: ) for the
  4334.  default sizes.
  4335.  
  4336.  On some terminals, changing the size of the plot will result in text being
  4337.  misplaced.
  4338.  
  4339.  Examples:
  4340.  
  4341.  To set the size to normal size use:
  4342.        set size 1,1
  4343.  
  4344.  To make the graph half size and square use:
  4345.        set size square 0.5,0.5
  4346.  
  4347.  To make the graph twice as high as wide use:
  4348.        set size ratio 2
  4349.  
  4350.  
  4351. 
  4352. File: gnuplot.info, Node: style, Prev: size, Up: set-show, Next: boxerrorbars
  4353.  
  4354.  Default styles are chosen with the `set function style`
  4355.  (*note function style:: ) and  `set data style` (*note data style:: )
  4356.  commands.  See `plot with` (*note with:: ) for information about how to
  4357.  override the default plotting style for individual functions and data sets.
  4358.  
  4359.  Syntax:
  4360.        set function style <style>
  4361.        set data style <style>
  4362.        show function style
  4363.        show data style
  4364.  
  4365.  The types used for all line and point styles (i.e., solid, dash-dot, color,
  4366.  etc. for lines; circles, squares, crosses, etc. for points) will be either
  4367.  those specified on the `plot` (*note plot:: ) or  `splot` (*note splot:: )
  4368.  command or will be chosen sequentially from the types available to the
  4369.  terminal in use.  Use the command `test` (*note test:: ) to see what is
  4370.  available.
  4371.  
  4372.  None of the styles requiring more than two columns of information (e.g.,
  4373.  `errorbars` (*note errorbars:: )) can be used with splots or function
  4374.  plots.  Neither ther `boxes` (*note boxes:: ) nor any of the `steps`
  4375.  (*note steps:: ) styles can be used with splots.  If an inappropriate style is
  4376.  specified, it will be changed to `points` (*note points:: ).
  4377.  
  4378.  For 2-d data with more than two columns, `gnuplot` (*note gnuplot:: ) is picky
  4379.  about the allowed `errorbar` styles.  The `using` (*note using:: ) option on
  4380.  the plot command can be used to set up the correct columns for the style you
  4381.  want.  (In this discussion, "column" will be used to refer both to a column in
  4382.  the data file and an entry in the `using` list.)
  4383.  
  4384.  For three columns, only `xerrorbars` (*note xerrorbars:: ),  `yerrorbars`
  4385.  (*note yerrorbars:: ) (or errorbars), boxes, and `boxerrorbars`
  4386.  (*note boxerrorbars:: ) are allowed.  If another plot style is used, the
  4387.  style will be changed to `yerrorbars`.  The `boxerrorbars` style will
  4388.  calculate the boxwidth automatically.
  4389.  
  4390.  For four columns, only `xerrorbars`, `yerrorbars` (or `errorbars`),
  4391.  `xyerrorbars` (*note xyerrorbars:: ),  `boxxyerrorbars`
  4392.  (*note boxxyerrorbars:: ), and boxerrorbars are allowed.  An illegal style
  4393.  will be changed to `yerrorbars`.
  4394.  
  4395.  Five-column data allow only the `boxerrorbars`, `financebars`
  4396.  (*note financebars:: ), and `candlesticks` (*note candlesticks:: )
  4397.  styles.  (The last two of these are primarily used for plots of financial
  4398.  prices.)  An illegal style will be changed to `boxerrorbars` before plotting.
  4399.  
  4400.  Six- and seven-column data only allow the `xyerrorbars` and `boxxyerrorbars`
  4401.  styles.  Illegal styles will be changed to `xyerrorbars` before plotting.
  4402.  
  4403.  For more information about error bars, please see `plot errorbars`.
  4404.  
  4405. * Menu:
  4406.  
  4407. * boxerrorbars::
  4408. * boxes::
  4409. * boxxyerrorbars::
  4410. * candlesticks::
  4411. * dots::
  4412. * financebars::
  4413. * fsteps::
  4414. * histeps::
  4415. * impulses::
  4416. * lines::
  4417. * linespoints::
  4418. * points::
  4419. * steps::
  4420. * vector::
  4421. * xerrorbars::
  4422. * xyerrorbars::
  4423. * yerrorbars::
  4424.  
  4425. 
  4426. File: gnuplot.info, Node: boxerrorbars, Prev: style, Up: style, Next: boxes
  4427.  
  4428.  The `boxerrorbars` style is only relevant to 2-d data plotting.  It is a
  4429.  combination of the `boxes` (*note boxes:: ) and  `yerrorbars`
  4430.  (*note yerrorbars:: ) styles.  The boxwidth will come from the fourth column
  4431.  if the y errors are in the form of "ydelta" and the boxwidth was not
  4432.  previously set equal to -2.0 (`set boxwidth -2.0`) or from the fifth column if
  4433.  the y errors are in the form of "ylow yhigh".  The special case  `boxwidth =
  4434.  -2.0` is for four-column data with y errors in the form "ylow yhigh".  In this
  4435.  case the boxwidth will be calculated so that each box touches the adjacent
  4436.  boxes.  The width will also be calculated in cases where three-column data are
  4437.  used.
  4438.  
  4439.  The box height is determined from the y error in the same way as it is for
  4440.  the `yerrorbars` style---either from y-ydelta to y+ydelta or from ylow to
  4441.  yhigh, depending on how many data columns are provided.
  4442.  
  4443. 
  4444. File: gnuplot.info, Node: boxes, Prev: boxerrorbars, Up: style, Next: boxxyerrorbars
  4445.  
  4446.  The `boxes` style is only relevant to 2-d plotting.  It draws a box centered
  4447.  about the given x coordinate from the x axis (not the graph border) to the
  4448.  given y coordinate.  The width of the box is obtained in one of three ways.
  4449.  If it is a data plot and the data file has a third column, this will be used
  4450.  to set the width of the box.  If not, if a width has been set using the `set
  4451.  boxwidth` command, this will be used.  If neither of these is available, the
  4452.  width of each box will be calculated automatically so that it touches the
  4453.  adjacent boxes.
  4454.  
  4455. 
  4456. File: gnuplot.info, Node: boxxyerrorbars, Prev: boxes, Up: style, Next: candlesticks
  4457.  
  4458.  The `boxxyerrorbars` style is only relevant to 2-d data plotting.  It is a
  4459.  combination of the `boxes` (*note boxes:: ) and  `xyerrorbars`
  4460.  (*note xyerrorbars:: ) styles.
  4461.  
  4462.  The box width and height are determined from the x and y errors in the same
  4463.  way as they are for the `xyerrorbars` style---either from xlow to xhigh and
  4464.  from ylow to yhigh, or from x-xdelta to x+xdelta and from y-ydelta to
  4465.  y+ydelta , depending on how many data columns are provided.
  4466.  
  4467. 
  4468. File: gnuplot.info, Node: candlesticks, Prev: boxxyerrorbars, Up: style, Next: dots
  4469.  
  4470.  The `candlesticks` style is only relevant for 2-d data plotting of financial
  4471.  data.  Five columns of data are required; in order, these should be the x
  4472.  coordinate (most likely a date) and the opening, low, high, and closing
  4473.  prices.  The symbol is an open rectangle, centered horizontally at the x
  4474.  coordinate and limited vertically by the opening and closing prices.  A
  4475.  vertical line segment at the x coordinate extends up from the top of the
  4476.  rectangle to the high price and another down to the low.  The width of the
  4477.  rectangle may be changed by `set bar` (*note bar:: ).  The symbol will be
  4478.  unchanged if the low and high prices are interchanged or if the opening and
  4479.  closing prices are interchanged.  See `set bar` and `financebars`
  4480.  (*note financebars:: ).
  4481.  
  4482.  
  4483. 
  4484. File: gnuplot.info, Node: dots, Prev: candlesticks, Up: style, Next: financebars
  4485.  
  4486.  The `dots` style plots a tiny dot at each point; this is useful for scatter
  4487.  plots with many points.
  4488.  
  4489. 
  4490. File: gnuplot.info, Node: financebars, Prev: dots, Up: style, Next: fsteps
  4491.  
  4492.  The `financebars` style is only relevant for 2-d data plotting of financial
  4493.  data.  Five columns of data are required; in order, these should be the x
  4494.  coordinate (most likely a date) and the opening, low, high, and closing
  4495.  prices.  The symbol is a vertical line segment, located horizontally at the x
  4496.  coordinate and limited vertically by the high and low prices.  A horizontal
  4497.  tic on the left marks the opening price and one on the right marks the
  4498.  closing price.  The length of these tics may be changed by `set bar`
  4499.  (*note bar:: ).  The symbol will be unchanged if the high and low prices are
  4500.  interchanged.  See `set bar` and `candlesticks` (*note candlesticks:: ).
  4501.  
  4502.  
  4503. 
  4504. File: gnuplot.info, Node: fsteps, Prev: financebars, Up: style, Next: histeps
  4505.  
  4506.  The `fsteps` style is only relevant to 2-d plotting.  It connects consecutive
  4507.  points with two line segments: the first from (x1,y1) to (x1,y2) and the
  4508.  second from (x1,y2) to (x2,y2).
  4509.  
  4510. 
  4511. File: gnuplot.info, Node: histeps, Prev: fsteps, Up: style, Next: impulses
  4512.  
  4513.  The `histeps` style is only relevant to 2-d plotting.  It is intended for
  4514.  plotting histograms.  Y-values are assumed to be centered at the x-values;
  4515.  the point at x1 is represented as a horizontal line from ((x0+x1)/2,y1) to
  4516.  ((x1+x2)/2,y1).  The lines representing the end points are extended so that
  4517.  the step is centered on at x.  Adjacent points are connected by a vertical
  4518.  line at their average x, that is, from ((x1+x2)/2,y1) to ((x1+x2)/2,y2).
  4519.  
  4520.  If `autoscale` (*note autoscale:: ) is in effect, it selects the xrange from
  4521.  the data rather than the steps, so the end points will appear only half as
  4522.  wide as the others.
  4523.  
  4524.  `histeps` is only a plotting style; `gnuplot` (*note gnuplot:: ) does not have
  4525.  the ability to create bins and determine their population from some data set.
  4526.  
  4527.  
  4528. 
  4529. File: gnuplot.info, Node: impulses, Prev: histeps, Up: style, Next: lines
  4530.  
  4531.  The `impulses` style displays a vertical line from the x axis (not the graph
  4532.  border), or from the grid base for `splot` (*note splot:: ), to each point.
  4533.  
  4534.  
  4535. 
  4536. File: gnuplot.info, Node: lines, Prev: impulses, Up: style, Next: linespoints
  4537.  
  4538.  The `lines` style connects adjacent points with straight line segments.
  4539.  
  4540. 
  4541. File: gnuplot.info, Node: linespoints, Prev: lines, Up: style, Next: points
  4542.  
  4543.  The `linespoints` style does both `lines` (*note lines:: ) and  `points`
  4544.  (*note points:: ), that is, it draws a small symbol at each point and then
  4545.  connects adjacent points with straight line segments.  The command `set
  4546.  pointsize` (*note pointsize:: ) may be used to change the size of the
  4547.  points.  See `set pointsize` for its usage.
  4548.  
  4549.  `linespoints` may be abbreviated `lp`.
  4550.  
  4551. 
  4552. File: gnuplot.info, Node: points, Prev: linespoints, Up: style, Next: steps
  4553.  
  4554.  The `points` style displays a small symbol at each point.  The command `set
  4555.  pointsize` may be used to change the size of the points.  See `set pointsize`
  4556.  (*note pointsize:: ) for its usage.
  4557.  
  4558.  
  4559. 
  4560. File: gnuplot.info, Node: steps, Prev: points, Up: style, Next: vector
  4561.  
  4562.  The `steps` style is only relevant to 2-d plotting.  It connects consecutive
  4563.  points with two line segments: the first from (x1,y1) to (x2,y1) and the
  4564.  second from (x2,y1) to (x2,y2).
  4565.  
  4566. 
  4567. File: gnuplot.info, Node: vector, Prev: steps, Up: style, Next: xerrorbars
  4568.  
  4569.  The `vector` style draws a vector from (x,y) to (x+xdelta,y+ydelta).  Thus
  4570.  it requires four columns of data.  It also draws a small arrowhead at the
  4571.  end of the vector.
  4572.  
  4573.  The `vector` style is still experimental: it doesn't get clipped properly
  4574.  and other things may also be wrong with it.  Use it at your own risk.
  4575.  
  4576. 
  4577. File: gnuplot.info, Node: xerrorbars, Prev: vector, Up: style, Next: xyerrorbars
  4578.  
  4579.  The `xerrorbars` style is only relevant to 2-d data plots.  `xerrorbars` is
  4580.  like `dots` (*note dots:: ), except that a horizontal error bar is also
  4581.  drawn.  At each point (x,y), a line is drawn from (xlow,y) to (xhigh,y) or
  4582.  from (x-xdelta,y) to (x+xdelta,y), depending on how many data columns are
  4583.  provided.  A tic mark is placed at the ends of the error bar (unless `set bar`
  4584.  (*note bar:: ) is used---see set bar` for details).
  4585.  
  4586.  
  4587. 
  4588. File: gnuplot.info, Node: xyerrorbars, Prev: xerrorbars, Up: style, Next: yerrorbars
  4589.  
  4590.  The `xyerrorbars` style is only relevant to 2-d data plots.  `xyerrorbars` is
  4591.  like `dots` (*note dots:: ), except that horizontal and vertical error bars
  4592.  are also drawn. At each point (x,y), lines are drawn from (x,y-ydelta) to
  4593.  (x,y+ydelta) and from (x-xdelta,y) to (x+xdelta,y) or from (x,ylow) to
  4594.  (x,yhigh) and from (xlow,y) to (xhigh,y), depending upon the number of data
  4595.  columns provided.  A tic mark is placed at the ends of the error bar (unless
  4596.  `set bar` (*note bar:: ) is used---see `set bar` for details).
  4597.  
  4598.  If data are provided in an unsupported mixed form, the `using`
  4599.  (*note using:: ) filter on the `plot` (*note plot:: ) command should be used
  4600.  to set up the appropriate form.  For example, if the data are of the form
  4601.  (x,y,xdelta,ylow,yhigh), then you can use
  4602.  
  4603.        plot 'data' using 1:2:($1-$3),($1+$3),4,5 with xyerrorbars
  4604.  
  4605. 
  4606. File: gnuplot.info, Node: yerrorbars, Prev: xyerrorbars, Up: style
  4607.  
  4608.  The `yerrorbars` (or `errorbars` (*note errorbars:: )) style is only relevant
  4609.  to 2-d data plots. `yerrorbars` is like `dots` (*note dots:: ), except that a
  4610.  vertical error bar is also drawn. At each point (x,y), a line is drawn from
  4611.  (x,y-ydelta) to (x,y+ydelta) or from (x,ylow) to (x,yhigh), depending on how
  4612.  many data columns are provided. A tic mark is placed at the ends of the error
  4613.  bar (unless `set bar` (*note bar:: ) is used---see `set bar` for details).
  4614.  
  4615.  
  4616. 
  4617. File: gnuplot.info, Node: surface, Prev: style, Up: set-show, Next: terminal
  4618.  
  4619.  The command `set surface` controls the display of surfaces, which are drawn
  4620.  as a mesh of isolines.
  4621.  
  4622.  Syntax:
  4623.        set surface
  4624.        set nosurface
  4625.        show surface
  4626.  
  4627.  Whenever `set nosurface` is issued, no surface isolines/mesh will be drawn.
  4628.  This is useful if contours are to be displayed by themselves.  See also `set
  4629.  contour`.
  4630.  
  4631. 
  4632. File: gnuplot.info, Node: terminal, Prev: surface, Up: set-show, Next: aed767
  4633.  
  4634.  `gnuplot` (*note gnuplot:: ) supports many different graphics devices.  Use
  4635.  set terminal to tell `gnuplot` what kind of output to generate.
  4636.  
  4637.  Syntax:
  4638.        set terminal {<terminal-type>}
  4639.        show terminal
  4640.  
  4641.  If <terminal-type> is omitted, `gnuplot` will list the available terminal
  4642.  types.  <terminal-type> may be abbreviated.
  4643.  
  4644.  Use `set output` (*note output:: ) to redirect this output to a file or
  4645.  device.
  4646.  
  4647.  If both `set terminal` and `set output` are used together, it is safest to
  4648.  give `set terminal` first, because some terminals set a flag which is needed
  4649.  in some operating systems.
  4650.  
  4651.  Several terminals have additional options.  For example, see `dumb`
  4652.  (*note dumb:: ), `iris4d`, `hpljii` (*note hpljii:: ) or  `postscript`
  4653.  (*note postscript:: ).
  4654.  
  4655.  This document may describe drivers that are not available to you because they
  4656.  were not installed, or it may not describe all the drivers that are available
  4657.  to you, depending on its output format.
  4658.  
  4659. * Menu:
  4660.  
  4661. * aed767::
  4662. * gpic::
  4663. * regis::
  4664. * tek410x::
  4665. * tek40::
  4666. * x11::
  4667. * xlib::
  4668. * aifm::
  4669. * cgm::
  4670. * corel::
  4671. * dumb::
  4672. * dxf::
  4673. * dxy800a::
  4674. * excl::
  4675. * fig::
  4676. * hp2623a::
  4677. * hp2648::
  4678. * hp500c::
  4679. * hpgl::
  4680. * hpljii::
  4681. * hppj::
  4682. * imagen::
  4683. * kyo::
  4684. * mif::
  4685. * pbm::
  4686. * png::
  4687. * postscript::
  4688. * qms::
  4689. * table::
  4690. * tgif::
  4691. * tkcanvas::
  4692. * vx384::
  4693. * epson-180dpi::
  4694. * latex::
  4695. * pslatex and pstex::
  4696. * eepic::
  4697. * tpic::
  4698. * pstricks::
  4699. * texdraw::
  4700. * mf::
  4701.  
  4702. 
  4703. File: gnuplot.info, Node: aed767, Prev: terminal, Up: terminal, Next: gpic
  4704.  
  4705.  The `aed512` and `aed767` terminal drivers support AED graphics terminals.
  4706.  The two drivers differ only in their horizontal ranges, which are 512 and
  4707.  768 pixels, respectively.  Their vertical range is 575 pixels.  There are
  4708.  no options for these drivers.
  4709.  
  4710. 
  4711. File: gnuplot.info, Node: gpic, Prev: aed767, Up: terminal, Next: regis
  4712.  
  4713.  The `gpic` terminal driver generates GPIC graphs in the Free Software
  4714.  Foundations's "groff" package.  The default size is 5 x 3 inches.  The only
  4715.  option is the origin, which defaults to (0,0).
  4716.  
  4717.  Syntax:
  4718.        set terminal gpic {<x> <y>}
  4719.  
  4720.  where `x` and `y` are in inches.
  4721.  
  4722.  A simple graph can be formatted using
  4723.  
  4724.        groff -p -mpic -Tps file.pic > file.ps.
  4725.  
  4726.  The output from pic can be pipe-lined into eqn, so it is possible to put
  4727.  complex functions in a graph with the `set label` (*note label:: ) and set
  4728.  {x/y}label commands.  For instance,
  4729.  
  4730.        set ylab '@space 0 int from 0 to x alpha ( t ) roman d t@'
  4731.  
  4732.  will label the y axis with a nice integral if formatted with the command:
  4733.  
  4734.        gpic filename.pic | geqn -d@@ -Tps | groff -m[macro-package] -Tps
  4735.            > filename.ps
  4736.  
  4737.  Figures made this way can be scaled to fit into a document.  The pic language
  4738.  is easy to understand, so the graphs can be edited by hand if need be.  All
  4739.  co-ordinates in the pic-file produced by `gnuplot` (*note gnuplot:: ) are
  4740.  given as x+gnuplotx and y+gnuploty.  By default x and y are given the value
  4741.  0.  If this line is removed with an editor in a number of files, one can put
  4742.  several graphs in one figure like this (default size is 5.0x3.0 inches):
  4743.  
  4744.        .PS 8.0
  4745.        x=0;y=3
  4746.        copy "figa.pic"
  4747.        x=5;y=3
  4748.        copy "figb.pic"
  4749.        x=0;y=0
  4750.        copy "figc.pic"
  4751.        x=5;y=0
  4752.        copy "figd.pic"
  4753.        .PE
  4754.  
  4755.  This will produce an 8-inch-wide figure with four graphs in two rows on top
  4756.  of each other.
  4757.  
  4758.  One can also achieve the same thing by the command
  4759.  
  4760.        set terminal gpic x y
  4761.  
  4762.  for example, using
  4763.  
  4764.        .PS 6.0
  4765.        copy "trig.pic"
  4766.        .PE
  4767.  
  4768. 
  4769. File: gnuplot.info, Node: regis, Prev: gpic, Up: terminal, Next: tek410x
  4770.  
  4771.  The `regis` terminal device generates output in the REGIS graphics language.
  4772.  It has the option of using 4 (the default) or 16 colors.
  4773.  
  4774.  Syntax:
  4775.        set terminal regis {4 | 16}
  4776.  
  4777. 
  4778. File: gnuplot.info, Node: tek410x, Prev: regis, Up: terminal, Next: tek40
  4779.  
  4780.  The `tek410x` terminal driver supports the 410x and 420x family of Tektronix
  4781.  terminals.  It has no options.
  4782.  
  4783. 
  4784. File: gnuplot.info, Node: tek40, Prev: tek410x, Up: terminal, Next: x11
  4785.  
  4786.  This family of terminal drivers supports a variety of VT-like terminals.
  4787.  `tek40xx` supports Tektronix 4010 and others as well as most TEK emulators;
  4788.  `vttek` supports VT-like tek40xx terminal emulators; `kc-tek40xx` supports
  4789.  MS-DOS Kermit Tek4010 terminal emulators in color: `km-tek40xx` supports them
  4790.  in monochrome; `selanar` supports Selanar graphics; and `bitgraph` supports
  4791.  BBN Bitgraph terminals.  None have any options.
  4792.  
  4793. 
  4794. File: gnuplot.info, Node: x11, Prev: tek40, Up: terminal, Next: command-line-options
  4795.  
  4796.  `gnuplot` (*note gnuplot:: ) provides the x11 terminal type for use with X
  4797.  servers.  This terminal type is set automatically at startup if the `DISPLAY`
  4798.  environment variable is set, if the `TERM` environment variable is set to
  4799.  `xterm`, or if the `-display` command line option is used.
  4800.  
  4801.  Syntax:
  4802.        set terminal x11 {reset} {<n>}
  4803.  
  4804.  Multiple plot windows are supported: `set terminal x11 <n>` directs the
  4805.  output to plot window number n.  If n>0, the terminal number will be
  4806.  appended to the window title and the icon will be labeled `gplt <n>`.
  4807.  The active window may distinguished by a change in cursor (from default
  4808.  to crosshair.)
  4809.  
  4810.  Plot windows remain open even when the `gnuplot` driver is changed to a
  4811.  different device.  A plot window can be closed by pressing the letter q
  4812.  while that window has input focus, or by choosing `close` from a window
  4813.  manager menu.
  4814.  
  4815.  All plot windows can be closed by specifying `reset` (*note reset:: ), which
  4816.  actually terminates the subprocess which maintains the windows (unless
  4817.  -persist was specified).
  4818.  
  4819.  For terminal type `x11`, `gnuplot` accepts (when initialized) the standard
  4820.  X Toolkit options and resources such as geometry, font, and background from
  4821.  from the command line arguments or a configuration file.  See the X(1) man
  4822.  page (or its equivalent) for a description of the options.
  4823.  
  4824.  Many other options are available for the `x11` terminal.  These may be
  4825.  specified either as command-line options when `gnuplot` is invoked or as
  4826.  resources in the configuration file "/.Xdefaults".  Thus they are chosen
  4827.  at start-up time and cannot be altered during a single `gnuplot` session.
  4828.  
  4829. * Menu:
  4830.  
  4831. * command-line-options::
  4832.  
  4833. 
  4834. File: gnuplot.info, Node: command-line-options, Prev: x11, Up: x11
  4835.  
  4836.  In addition to the X Toolkit options, the following options may be specified
  4837.  on the command line when starting `gnuplot` (*note gnuplot:: ) or as resources
  4838.  in your ".Xdefaults" file:  `-mono`    forces monochrome rendering on color
  4839.  displays.  `-gray`    requests grayscale rendering on grayscale or color
  4840.  displays.             (Grayscale displays receive monochrome rendering by
  4841.  default.)  `-clear`   requests that the window be cleared momentarily before
  4842.  a             new plot is displayed.  `-tvtwm`   requests that geometry
  4843.  specifications for position of the             window be made relative to the
  4844.  currently displayed portion             of the virtual root.  `-raise`   raise
  4845.  plot window after each plot  `-noraise` do not raise plot window after each
  4846.  plot  `-persist` plot windows survive after main gnuplot program exits The
  4847.  options are shown above in their command-line syntax.  When entered as
  4848.  resources in ".Xdefaults", they require a different syntax.
  4849.  
  4850.  Example:
  4851.        gnuplot*gray: on
  4852.  
  4853.  `gnuplot` provides a command line option (`-pointsize v`) and a resource
  4854.  (`gnuplot*pointsize: v`) to control the size of points plotted with the
  4855.  `points` (*note points:: ) plotting style.  The value v is a real number
  4856.  (greater than 0 and less than or equal to ten) used as a scaling factor for
  4857.  point sizes.  For example, `-pointsize 2` uses points twice the default size,
  4858.  and `-pointsize` `0.5` uses points half the normal size.
  4859.  
  4860.  Plot windows will automatically be closed at the end of the session
  4861.  unless the `-persist` option was given.
  4862.  
  4863.  For monochrome displays, `gnuplot` does not honor foreground or background
  4864.  colors.  The default is black-on-white.  `-rv` or `gnuplot*reverseVideo: on`
  4865.  requests white-on-black.
  4866.  
  4867.  For color displays, `gnuplot` honors the following resources (shown here with
  4868.  their default values).  The values may be color names as listed in the X11
  4869.  rgb.txt file on your system, hexadecimal RGB color specifications (see X11
  4870.  documentation), or a color name followed by a comma and an `intensity` value
  4871.  from 0 to 1.  For example, `blue,.5` means a half intensity blue.
  4872.   gnuplot*background: white
  4873.   gnuplot*textColor: black
  4874.   gnuplot*borderColor: black
  4875.   gnuplot*axisColor: black
  4876.   gnuplot*line1Color: red
  4877.   gnuplot*line2Color: green
  4878.   gnuplot*line3Color: blue
  4879.   gnuplot*line4Color: magenta
  4880.   gnuplot*line5Color: cyan
  4881.   gnuplot*line6Color: sienna
  4882.   gnuplot*line7Color: orange
  4883.   gnuplot*line8Color: coral
  4884.  
  4885.  The command-line syntax for these is, for example,
  4886.  
  4887.  Example:
  4888.        gnuplot -background coral
  4889.  
  4890.  When `-gray` is selected, `gnuplot` honors the following resources for
  4891.  grayscale or color displays (shown here with their default values).  Note
  4892.  that the default background is black.
  4893.   gnuplot*background: black
  4894.   gnuplot*textGray: white
  4895.   gnuplot*borderGray: gray50
  4896.   gnuplot*axisGray: gray50
  4897.   gnuplot*line1Gray: gray100
  4898.   gnuplot*line2Gray: gray60
  4899.   gnuplot*line3Gray: gray80
  4900.   gnuplot*line4Gray: gray40
  4901.   gnuplot*line5Gray: gray90
  4902.   gnuplot*line6Gray: gray50
  4903.   gnuplot*line7Gray: gray70
  4904.   gnuplot*line8Gray: gray30
  4905.  
  4906.  `gnuplot` honors the following resources for setting the width (in pixels) of
  4907.  plot lines (shown here with their default values.)  0 or 1 means a minimal
  4908.  width line of 1 pixel width.  A value of 2 or 3 may improve the appearance of
  4909.  some plots.
  4910.   gnuplot*borderWidth: 2
  4911.   gnuplot*axisWidth: 0
  4912.   gnuplot*line1Width: 0
  4913.   gnuplot*line2Width: 0
  4914.   gnuplot*line3Width: 0
  4915.   gnuplot*line4Width: 0
  4916.   gnuplot*line5Width: 0
  4917.   gnuplot*line6Width: 0
  4918.   gnuplot*line7Width: 0
  4919.   gnuplot*line8Width: 0
  4920.  
  4921.  `gnuplot` honors the following resources for setting the dash style used for
  4922.  plotting lines.  0 means a solid line.  A two-digit number `jk` (`j` and `k`
  4923.  are >= 1  and <= 9) means a dashed line with a repeated pattern of `j` pixels
  4924.  on followed by `k` pixels off.  For example, '16' is a "dotted" line with one
  4925.  pixel on followed by six pixels off.  More elaborate on/off patterns can be
  4926.  specified with a four-digit value.  For example, '4441' is four on, four off,
  4927.  four on, one off.  The default values shown below are for monochrome displays
  4928.  or monochrome rendering on color or grayscale displays.  For color displays,
  4929.  the default for each is 0 (solid line) except for `axisDashes` which defaults
  4930.  to a '16' dotted line.
  4931.   gnuplot*borderDashes: 0
  4932.   gnuplot*axisDashes: 16
  4933.   gnuplot*line1Dashes: 0
  4934.   gnuplot*line2Dashes: 42
  4935.   gnuplot*line3Dashes: 13
  4936.   gnuplot*line4Dashes: 44
  4937.   gnuplot*line5Dashes: 15
  4938.   gnuplot*line6Dashes: 4441
  4939.   gnuplot*line7Dashes: 42
  4940.   gnuplot*line8Dashes: 13
  4941.  
  4942.  The size or aspect ratio of a plot may be changed by resizing the `gnuplot`
  4943.  window.
  4944.  
  4945. 
  4946. File: gnuplot.info, Node: xlib, Prev: x11, Up: terminal, Next: aifm
  4947.  
  4948.  The `xlib` terminal driver supports the X11 Windows System.  It generates
  4949.  gnulib_x11 commands.  `set term x11` (*note x11:: ) behaves similarly to set
  4950.  terminal xlib; set output "|gnuplot_x11"`.  `xlib` has no options, but see
  4951.  `x11`.
  4952.  
  4953.  
  4954. 
  4955. File: gnuplot.info, Node: aifm, Prev: xlib, Up: terminal, Next: cgm
  4956.  
  4957.  Several options may be set in `aifm`---the Adobe Illustrator 3.0+ driver.
  4958.  
  4959.  Syntax:
  4960.        set terminal aifm {<color>} {"<fontname>"} {<fontsize>}
  4961.  
  4962.  <color> is either `color` or `monochrome`; "<fontname>" is the name of a
  4963.  valid PostScript font; <fontsize> is the size of the font in PostScript
  4964.  points, before scaling by the `set size` (*note size:: ) command.  Selecting
  4965.  default sets all options to their default values: `monochrome`, "Helvetica",
  4966.  and 14pt.
  4967.  
  4968.  Since AI does not really support multiple pages, multiple graphs will be
  4969.  drawn directly on top of one another.  However, each graph will be grouped
  4970.  individually, making it easy to separate them inside AI (just pick them up
  4971.  and move them).
  4972.  
  4973.  Examples:
  4974.        set term aifm
  4975.        set term aifm 22
  4976.        set size 0.7,1.4; set term aifm color "Times-Roman" 14
  4977.  
  4978. 
  4979. File: gnuplot.info, Node: cgm, Prev: aifm, Up: terminal, Next: font
  4980.  
  4981.  The `cgm` terminal generates a Computer Graphics Metafile.  This file format
  4982.  is a subset of the ANSI X3.122-1986 standard entitled "Computer Graphics -
  4983.  Metafile for the Storage and Transfer of Picture Description Information".
  4984.  Several options may be set in `cgm`.
  4985.  
  4986.  Syntax:
  4987.        set terminal cgm {<mode>} {<color>} {<rotation>}
  4988.                         {width <plot_width>} {linewidth <line_width>}
  4989.                         {"<font>"} {<fontsize>}
  4990.  
  4991.  where <mode> is `landscape`, `portrait`, or `default`;
  4992.  <color> is either `color` or `monochrome`; 
  4993.  <rotation> is either `rotate` (*note rotate:: ) or norotate; <plot_width> is
  4994.  the width of the page in points;  <line_width> is the line width in points; 
  4995.  <font> is the name of a font; and  `<fontsize>` is the size of the font in
  4996.  points.
  4997.  
  4998.  By default, `cgm` uses rotated text for the Y axis label.
  4999.  
  5000.  The first five options can be in any order.  Selecting `default` sets all
  5001.  options to their default values.
  5002.  
  5003.  Examples:
  5004.        set terminal cgm landscape color rotate width 432 linewidth 1 \
  5005.                       'Arial Bold' 12                  # defaults
  5006.        set terminal cgm 14 linewidth 2  14  # wider lines & larger font
  5007.        set terminal cgm portrait 'Times Roman Italic' 12
  5008.  
  5009. * Menu:
  5010.  
  5011. * font::
  5012. * fontsize::
  5013. * linewidth::
  5014. * rotate::
  5015. * size::
  5016. * width::
  5017. * winword6::
  5018.  
  5019. 
  5020. File: gnuplot.info, Node: font, Prev: cgm, Up: cgm, Next: fontsize
  5021.  
  5022.  The first part of a Computer Graphics Metafile, the metafile description,
  5023.  includes a font table.  In the picture body, a font is designated by an
  5024.  index into this table.  By default, this terminal generates a table with
  5025.  the following fonts:
  5026.        Arial
  5027.        Arial Italic
  5028.        Arial Bold
  5029.        Arial Bold Italic
  5030.        Times Roman
  5031.        Times Roman Italic
  5032.        Times Roman Bold
  5033.        Times Roman Bold Italic
  5034.        Helvetica
  5035.        Roman
  5036.  Case is not distinct, but the modifiers must appear in the above order (that
  5037.  is, not 'Arial Italic Bold').  'Arial Bold' is the default font.
  5038.  
  5039.  You may also specify a font name which does not appear in the default font
  5040.  table.  In that case, a new font table is constructed with the specified
  5041.  font as its only entry.  You must ensure that the spelling, capitalization,
  5042.  and spacing of the name are appropriate for the application that will read
  5043.  the CGM file.
  5044.  
  5045. 
  5046. File: gnuplot.info, Node: fontsize, Prev: font, Up: cgm, Next: linewidth
  5047.  
  5048.  Fonts are scaled assuming the page is 6 inches wide.  If the `size`
  5049.  (*note size:: ) command is used to change the aspect ratio of the page or the
  5050.  CGM file is converted to a different width (e.g. it is imported into a
  5051.  document in which the margins are not 6 inches apart), the resulting font
  5052.  sizes will be different. To change the assumed width, use the `width`
  5053.  (*note width:: ) option.
  5054.  
  5055.  
  5056. 
  5057. File: gnuplot.info, Node: linewidth, Prev: fontsize, Up: cgm, Next: rotate
  5058.  
  5059.  The `linewidth` option sets the width of lines in pt.  The default width is
  5060.  1 pt.  Scaling is affected by the actual width of the page, as discussed
  5061.  under the `fontsize` (*note fontsize:: ) and  `width` (*note width:: )
  5062.  options
  5063.  
  5064.  
  5065. 
  5066. File: gnuplot.info, Node: rotate, Prev: linewidth, Up: cgm, Next: size
  5067.  
  5068.  The `norotate` option may be used to disable text rotation.  For example,
  5069.  the CGM input filter for Word for Windows 6.0c can accept rotated text, but
  5070.  the DRAW editor within Word cannot.  If you edit a graph (for example, to
  5071.  label a curve), all rotated text is restored to horizontal.  The Y axis
  5072.  label will then extend beyond the clip boundary.  With `norotate`, the Y
  5073.  axis label starts in a less attractive location, but the page can be edited
  5074.  without damage.  The `rotate` option confirms the default behavior.
  5075.  
  5076. 
  5077. File: gnuplot.info, Node: size, Prev: rotate, Up: cgm, Next: width
  5078.  
  5079.  Default size of a CGM page is 32599 units wide and 23457 units high for
  5080.  landscape, or 23457 units wide by 32599 units high for portrait.
  5081.  
  5082. 
  5083. File: gnuplot.info, Node: width, Prev: size, Up: cgm, Next: winword6
  5084.  
  5085.  All distances in the CGM file are in abstract units.  The application that
  5086.  reads the file determines the size of the final page.  By default, the width
  5087.  of the final page is assumed to be 6 inches (15.24 cm).  This distance is
  5088.  used to calculate the correct font size, and may be changed with the `width`
  5089.  option.  The keyword should be followed by the width in points.  (Here, a
  5090.  point is 1/72 inch, as in PostScript.  This unit is known as a "big point"
  5091.  in TeX.)  `gnuplot` (*note gnuplot:: ) arithmetic can be used to convert from
  5092.  other units, as follows:       set terminal cgm width 432            #
  5093.  default       set terminal cgm width 6*72           # same as above       set
  5094.  terminal cgm width 10/2.54*72     # 10 cm wide
  5095.  
  5096.  
  5097. 
  5098. File: gnuplot.info, Node: winword6, Prev: width, Up: cgm
  5099.  
  5100.  The default font table was chosen to match, where possible, the default font
  5101.  assignments made by the Computer Graphics Metafile input filter for
  5102.  Microsoft Word 6.0c, although the filter makes available only 'Arial' and
  5103.  'Times Roman' fonts and their bold and/or italic variants.  Other fonts such
  5104.  as 'Helvetica' and 'Roman' are not available.  If the CGM file includes a
  5105.  font table, the filter mostly ignores it.  However, it changes certain font
  5106.  assignments so that they disagree with the table.  As a workaround, the
  5107.  `winword6` option deletes the font table from the CGM file.  In this case,
  5108.  the filter makes predictable font assignments.  'Arial Bold' is correctly
  5109.  assigned even with the font table present, which is one reason it was chosen
  5110.  as the default.
  5111.  
  5112.  `winword6` disables the color tables for a similar reason---with the color
  5113.  table included, Microsoft Word displays black for color 7.
  5114.  
  5115. 
  5116. File: gnuplot.info, Node: corel, Prev: cgm, Up: terminal, Next: dumb
  5117.  
  5118.  The `corel` terminal driver supports CorelDraw.
  5119.  
  5120.  Syntax:       set terminal corel {  default
  5121.                            | {monochrome | color
  5122.                                 {<fontname> {"<fontsize>" 
  5123.                                    {<xsize> <ysize> {<linewidth> }}}}}
  5124.  
  5125.  where the fontsize and linewidth are specified in points and the sizes in
  5126.  inches.  The defaults are monochrome, "SwitzerlandLight", 22, 8.2, 10 and 1.2.
  5127.  
  5128. 
  5129. File: gnuplot.info, Node: dumb, Prev: corel, Up: terminal, Next: dxf
  5130.  
  5131.  The `dumb` terminal driver has an optional size specification and trailing
  5132.  linefeed control.
  5133.  
  5134.  Syntax:
  5135.        set terminal dumb {[no]feed} {<xsize> <ysize>}
  5136.  
  5137.  where <xsize> and <ysize> set the size of the dumb terminals. Default is
  5138.  79 by 24. The last newline is printed only if `feed` is enabled.
  5139.  
  5140.  Examples:
  5141.        set term dumb nofeed
  5142.        set term dumb 79 49 # VGA screen---why would anyone do that?
  5143.  
  5144. 
  5145. File: gnuplot.info, Node: dxf, Prev: dumb, Up: terminal, Next: dxy800a
  5146.  
  5147.  The `dxf` terminal driver creates pictures that can be imported into AutoCad
  5148.  (Release 10.x).  It has no options of its own, but some features of its plots
  5149.  may be modified by other means.  The default size is 120x80 AutoCad units,
  5150.  which can be changed by `set size` (*note size:: ).  dxf uses seven colors
  5151.  (white, red, yellow, green, cyan, blue and magenta), which can be changed only
  5152.  by modifying the source file.  If a black-and-white plotting device is used,
  5153.  the colors are mapped to differing line thicknesses.  See the description of
  5154.  the AutoCad print/plot command.
  5155.  
  5156.  
  5157. 
  5158. File: gnuplot.info, Node: dxy800a, Prev: dxf, Up: terminal, Next: excl
  5159.  
  5160.  This terminal driver supports the Roland DXY800A plotter.  It has no options.
  5161.  
  5162. 
  5163. File: gnuplot.info, Node: excl, Prev: dxy800a, Up: terminal, Next: fig
  5164.  
  5165.  The `excl` terminal driver supports Talaris printers such as the EXCL Laser
  5166.  printer and the 1590.  It has no options.
  5167.  
  5168. 
  5169. File: gnuplot.info, Node: fig, Prev: excl, Up: terminal, Next: hp2623a
  5170.  
  5171.  The `fig` terminal device generates output in the Fig graphics language.
  5172.  
  5173.  Syntax:
  5174.        set terminal fig {monochrome | color} {small | big}
  5175.                         {pointsmax <max_points>}
  5176.                         {landscape | portrait}
  5177.                         {metric | inches}
  5178.                         {fontsize <fsize>}
  5179.                         {size <xsize> <ysize>}
  5180.                         {thickness <units>}
  5181.                         {depth <layer>}
  5182.  
  5183.  `monochrome` and `color` determine whether the picture is black-and-white or
  5184.  `color`.  `small` and `big` produce a 5x3 or 8x5 inch graph in the default
  5185.  `landscape` mode and 3x5 or 5x8 inches in `portrait` mode.  <max_points>
  5186.  sets the maximum number of points per polyline.  Default units for editing
  5187.  with "xfig" may be `metric` or `inches`.  `fontsize` (*note fontsize:: ) sets
  5188.  the size of the text font to <fsize> points.  `size` (*note size:: ) sets
  5189.  (overrides) the size of the drawing area to <xsize>*<ysize> in units of inches
  5190.  or centimeters depending on the `inches` or `metric` setting in
  5191.  effect.  `depth` sets the default depth layer for all lines and text.  The
  5192.  default depth is 10 to leave room for adding material with "xfig" on top of
  5193.  the plot.
  5194.  
  5195.  `thickness` sets the default line thickness, which is 1 if not specified.
  5196.  Overriding the thickness can be achieved by adding a multiple of 100 to the
  5197.  to the `linetype` value for a `plot` (*note plot:: ) command.  In a similar
  5198.  way the depth of plot elements (with respect to the default depth) can be
  5199.  controlled by adding a multiple of 1000 to <linetype>.  The depth is then
  5200.  <layer> + <linetype>/1000 and the thickness is (<linetype>%1000)/100 or, if
  5201.  that is zero, the default line thickness. Additional point-plot symbols are
  5202.  also available with the `fig` driver. The symbols can be used through
  5203.  `pointtype` values % 100 above 50, with different fill intensities controlled
  5204.  by <pointtype> % 5 and outlines in black (for <pointtype> % 10 < 5) or in the
  5205.  current color.  Available symbols are         50 - 59:  circles         60 -
  5206.  69:  squares         70 - 79:  diamonds         80 - 89:  upwards triangles
  5207.          90 - 99:  downwards triangles The size of these symbols is linked to
  5208.  the font size.  The depth of symbols is by default one less than the depth for
  5209.  lines to achieve nice error bars. If <pointtype> is above 1000, the depth is
  5210.  <layer> + <pointtype>/1000-1.  If <pointtype>%1000 is above 100, the fill
  5211.  color is (<pointtype>%1000)/100-1.
  5212.  
  5213.  Available fill colors are (from 1 to 9): black, blue, green, cyan, red,
  5214.  magenta, yellow, white and dark blue (in monochrome mode: black for 1 to 6
  5215.  and white for 7 to 9).
  5216.  
  5217.  See `plot with` (*note with:: ) for details of <linetype> and <pointtype>.
  5218.  
  5219.  The `big` option is a substitute for the `bfig` terminal in earlier versions,
  5220.  which is no longer supported.
  5221.  
  5222.  Examples:
  5223.        set terminal fig monochrome small pointsmax 1000  # defaults
  5224.  
  5225.        plot 'file.dat' with points linetype 102 pointtype 759
  5226.  would produce circles with a blue outline of width 1 and yellow fill color.
  5227.  
  5228.        plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 554
  5229.  would produce errorbars with black lines and circles filled red.  These
  5230.  circles are one layer above the lines (at depth 9 by default).
  5231.  
  5232.  To plot the error bars on top of the circles use
  5233.        plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 2554
  5234.  
  5235. 
  5236. File: gnuplot.info, Node: hp2623a, Prev: fig, Up: terminal, Next: hp2648
  5237.  
  5238.  The `hp2623a` terminal driver supports the Hewlett Packard HP2623A.  It has
  5239.  no options.
  5240.  
  5241. 
  5242. File: gnuplot.info, Node: hp2648, Prev: hp2623a, Up: terminal, Next: hp500c
  5243.  
  5244.  The `hp2648` terminal driver supports the Hewlett Packard HP2647 and HP2648.
  5245.  It has no options.
  5246.  
  5247. 
  5248. File: gnuplot.info, Node: hp500c, Prev: hp2648, Up: terminal, Next: hpgl
  5249.  
  5250.  The `hp500c` terminal driver supports the Hewlett Packard HP DeskJet 500c.
  5251.  It has options for resolution and compression.
  5252.  
  5253.  Syntax:
  5254.        set terminal hp500c {<res>} {<comp>}
  5255.  
  5256.  where `res` can be 75, 100, 150 or 300 dots per inch and `comp` can be "rle",
  5257.  or "tiff".  Any other inputs are replaced by the defaults, which are 75 dpi
  5258.  and no compression.  Rasterization at the higher resolutions may require a
  5259.  large amount of memory.
  5260.  
  5261. 
  5262. File: gnuplot.info, Node: hpgl, Prev: hp500c, Up: terminal, Next: hpljii
  5263.  
  5264.  The `hpgl` driver produces HPGL output for devices like the HP7475A plotter.
  5265.  There are two options which can be set---the number of pens and "eject", which
  5266.  tells the plotter to eject a page when done.  The default is to use 6 pens
  5267.  and not to eject the page when done.
  5268.  
  5269.  The international character sets ISO-8859-1 and CP850 are recognized via
  5270.  `set encoding iso_8859_1` or `set encoding cp850` (see `set encoding`
  5271.  (*note encoding:: ) for details).
  5272.  
  5273.  Syntax:
  5274.        set terminal hpgl {<number_of_pens>} {eject}
  5275.  
  5276.  The selection
  5277.  
  5278.        set terminal hpgl 8 eject
  5279.  
  5280.  is equivalent to the previous `hp7550` terminal, and the selection
  5281.  
  5282.        set terminal hpgl 4
  5283.  
  5284.  is equivalent to the previous `hp7580b` terminal.
  5285.  
  5286.  The `pcl5` driver supports the Hewlett-Packard Laserjet III.  It actually uses
  5287.  HPGL-2, but there is a name conflict among the terminal devices.  It has
  5288.  several options
  5289.  
  5290.  Syntax:
  5291.        set terminal pcl5 {<mode>} {<font>} {<fontsize>}
  5292.  
  5293.  where <mode> is `landscape`, or `portrait`, <font> is `stick`, `univers`, or
  5294.  `cg_times`, and <fontsize> is the size in points.
  5295.  
  5296.  With `pcl5` international characters are handled by the printer; you just put
  5297.  the appropriate 8-bit character codes into the text strings.  You don't need
  5298.  to bother with `set encoding`.
  5299.  
  5300.  HPGL graphics can be imported by many software packages.
  5301.  
  5302. 
  5303. File: gnuplot.info, Node: hpljii, Prev: hpgl, Up: terminal, Next: hppj
  5304.  
  5305.  The `hpljii` terminal driver supports the HP Laserjet Series II printer.  The
  5306.  `hpdj` driver supports the HP DeskJet 500 printer.  These drivers allow a
  5307.  choice of resolutions.
  5308.  
  5309.  Syntax:
  5310.        set terminal hpljii | hpdj {<res>}
  5311.  
  5312.  where `res` may be 75, 100, 150 or 300 dots per inch; the default is 75.
  5313.  Rasterization at the higher resolutions may require a large amount of memory.
  5314.  
  5315.  The `hp500c` (*note hp500c:: ) terminal is similar to hpdj; hp500c
  5316.  additionally supports color and compression.
  5317.  
  5318.  
  5319. 
  5320. File: gnuplot.info, Node: hppj, Prev: hpljii, Up: terminal, Next: imagen
  5321.  
  5322.  The `hppj` terminal driver supports the HP PaintJet and HP3630 printers.  The
  5323.  only option is the choice of font.
  5324.  
  5325.  Syntax:
  5326.        set terminal hppj {FNT5X9 | FNT9X17 | FNT13X25}
  5327.  
  5328.  with the middle-sized font (FNT9X17) being the default.
  5329.  
  5330. 
  5331. File: gnuplot.info, Node: imagen, Prev: hppj, Up: terminal, Next: kyo
  5332.  
  5333.  The `imagen` terminal driver supports Imagen laser printers.  It is capable
  5334.  of placing multiple graphs on a single page.
  5335.  
  5336.  Syntax:
  5337.        set terminal imagen {<fontsize>} {portrait | landscape}
  5338.                            {[<horiz>,<vert>]}
  5339.  
  5340.  where `fontsize` (*note fontsize:: ) defaults to 12 points and the layout
  5341.  defaults to landscape. `<horiz>` and `<vert>` are the number of graphs in the
  5342.  horizontal and vertical directions; these default to unity.
  5343.  
  5344.  Example:
  5345.        set terminal imagen portrait [2,3]
  5346.  
  5347.  puts six graphs on the page in three rows of two in portrait orientation.
  5348.  
  5349. 
  5350. File: gnuplot.info, Node: kyo, Prev: imagen, Up: terminal, Next: mif
  5351.  
  5352.  The `kyo` and `prescribe` terminal drivers support the Kyocera laser printer.
  5353.  The only difference between the two is that `kyo` uses "Helvetica" whereas
  5354.  `prescribe` uses "Courier".  There are no options.
  5355.  
  5356. 
  5357. File: gnuplot.info, Node: mif, Prev: kyo, Up: terminal, Next: pbm
  5358.  
  5359.  The `mif` terminal driver produces Frame Maker MIF format version 3.00.  It
  5360.  plots in MIF Frames with the size 15*10 cm, and plot primitives with the same
  5361.  pen will be grouped in the same MIF group.  Plot primitives in a `gnuplot`
  5362.  (*note gnuplot:: ) page will be plotted in a MIF Frame, and several MIF Frames
  5363.  are collected in one large MIF Frame.  The MIF font used for text is "Times".
  5364.  
  5365.  Several options may be set in the MIF 3.00 driver.
  5366.  
  5367.  Syntax:
  5368.        set terminal mif {colour | monochrome} {polyline | vectors}
  5369.                         {help | ?}
  5370.  
  5371.  `colour` plots lines with line types >= 0 in colour (MIF sep. 2--7) and
  5372.  `monochrome` plots all line types in black (MIF sep. 0).
  5373.  `polyline` plots curves as continuous curves and `vectors` plots curves as
  5374.  collections of vectors.
  5375.  `help` (*note help:: ) and ? print online help on standard error output---both
  5376.  print a short description of the usage; `help` also lists the options;
  5377.  
  5378.  Examples:
  5379.        set term mif colour polylines    # defaults
  5380.        set term mif                     # defaults
  5381.        set term mif vectors
  5382.        set term mif help
  5383.  
  5384. 
  5385. File: gnuplot.info, Node: pbm, Prev: mif, Up: terminal, Next: png
  5386.  
  5387.  Several options may be set in the `pbm` terminal---the driver for PBMplus.
  5388.  
  5389.  Syntax:
  5390.        set terminal pbm {<fontsize>} {<mode>}
  5391.  
  5392.  where <fontsize> is `small`, `medium`, or `large` and <mode> is `monochrome`,
  5393.  `gray` or `color`.  The default plot size is 640 pixels wide and 480 pixels
  5394.  high; this may be changed by `set size` (*note size:: ).
  5395.  
  5396.  The output of the `pbm` driver depends upon <mode>: `monochrome` produces a
  5397.  portable bitmap (one bit per pixel), `gray` a portable graymap (three bits
  5398.  per pixel) and `color` a portable pixmap (color, four bits per pixel).
  5399.  
  5400.  The output of this driver can be used with Jef Poskanzer's excellent PBMPLUS
  5401.  package, which provides programs to convert the above PBMPLUS formats to GIF,
  5402.  TIFF, MacPaint, Macintosh PICT, PCX, X11 bitmap and many others.
  5403.  
  5404.  Examples:
  5405.        set terminal pbm small monochrome             # defaults
  5406.        set size 2,2; set terminal pbm color medium
  5407.  
  5408. 
  5409. File: gnuplot.info, Node: png, Prev: pbm, Up: terminal, Next: postscript
  5410.  
  5411.  The `png` terminal driver supports Portable Network Graphics.  To compile it,
  5412.  you will need  the third-party libraries "libpng" and "zlib"; both are
  5413.  available at ftp://ftp.uu.net/graphics/png.  `png` has two options.
  5414.  
  5415.  Syntax:
  5416.        set terminal png {small | medium | large}
  5417.                         {monochrome | gray | color}
  5418.  
  5419.  The defaults are small (fontsize) and monochrome.
  5420.  
  5421. 
  5422. File: gnuplot.info, Node: postscript, Prev: png, Up: terminal, Next: enhanced postscript
  5423.  
  5424.  Several options may be set in the `postscript` driver.
  5425.  
  5426.  Syntax:
  5427.        set terminal postscript {<mode>} {color | monochrome}
  5428.                                {solid | dashed} {<duplexing>}
  5429.                                {enhanced | noenhanced}
  5430.                                {"<fontname>"} {<fontsize>}
  5431.  
  5432.  where <mode> is `landscape`, `portrait`, `eps` or `default`
  5433.  `solid` draws all plots with solid lines, overriding any dashed patterns;
  5434.  <duplexing> is `defaultplex`, `simplex` or `duplex` ("duplexing" in
  5435.  PostScript is the ability of the printer to print on both sides of the same
  5436.  page---don't set this if your printer can't do it);
  5437.  `enhanced` activates the "Enhanced PostScript" features (subscripts,
  5438.  superscripts and mixed fonts);
  5439.  `"<fontname>"` is the name of a valid PostScript font; and `<fontsize>` is
  5440.  the size of the font in PostScript points.
  5441.  
  5442.  `default` mode sets all options to their defaults: `landscape`, `monochrome`,
  5443.  `dashed`, `defaultplex`, `noenhanced`, "Helvetica" and 14pt.
  5444.   Default size of a PostScript plot is 10 inches wide and 7 inches high.
  5445.  
  5446.  `eps` mode generates EPS (Encapsulated PostScript) output, which is just
  5447.  regular PostScript with some additional lines that allow the file to be
  5448.  imported into a variety of other applications.  (The added lines are
  5449.  PostScript comment lines, so the file may still be printed by itself.)  To
  5450.  get EPS output, use the `eps` mode and make only one plot per file.  In `eps`
  5451.  mode the whole plot, including the fonts, is reduced to half of the default
  5452.  size.
  5453.  
  5454.  Examples:
  5455.        set terminal postscript default       # old postscript
  5456.        set terminal postscript enhanced      # old enhpost
  5457.        set terminal postscript landscape 22  # old psbig
  5458.        set terminal postscript eps 14        # old epsf1
  5459.        set terminal postscript eps 22        # old epsf2
  5460.        set size 0.7,1.4; set term post portrait color "Times-Roman" 14
  5461.  
  5462. * Menu:
  5463.  
  5464. * enhanced postscript::
  5465.  
  5466. 
  5467. File: gnuplot.info, Node: enhanced postscript, Prev: postscript, Up: postscript
  5468.  
  5469.   Control      Examples        Explanation
  5470.    ^           a^x             superscript
  5471.    _           a_x             subscript
  5472.    @           @x or a@^b_c    phantom box (occupies no width)
  5473.    &           &{space}        inserts space of specified length
  5474.  
  5475.  {text} can be used to allow multiple-character text, where only a single
  5476.  character is expected (e.g., 2^{10}).  To change the font and/or size, use
  5477.  the full form:  {/[fontname][=fontsize] text}   (For example, {/Symbol=20 G}
  5478.  is a 20 point GAMMA).  (The '/' character MUST be the first character after
  5479.  the '{'.)
  5480.  
  5481.  If the encoding vector has been changed by `set encoding` (*note encoding:: ),
  5482.  the default encoding vector can be used instead by following the slash with a
  5483.  dash.  This is unnecessary if you use the Symbol font, however---since /Symbol
  5484.  uses its own encoding vector, `gnuplot` (*note gnuplot:: ) will not apply any
  5485.  other encoding vector to it.
  5486.  
  5487.  The phantom box is useful for a@^b_c to align superscripts and subscripts,
  5488.  and for overwriting an accent on a letter.  (The latter is tricky; it is much
  5489.  easier to use `set encoding iso_8859_1` to change to the ISO Latin-1 encoding
  5490.  vector, which contains a large variety of letters with accents or other
  5491.  diacritical marks.)  It is common sense to put the shorter of the two in the
  5492.  phantom box.
  5493.  
  5494.  Space equal in length to a string can be inserted using the '&' character.
  5495.  Thus
  5496.          'abc&{def}ghi'
  5497.  would produce
  5498.          'abc   ghi'.
  5499.  
  5500.  You can access special symbols numerically by specifying \character-code (in
  5501.  octal), e.g., {/Symbol \245} is the symbol for infinity.
  5502.  
  5503.  You can escape control characters using \, e.g.,  \\, \{, and so on.
  5504.  
  5505.  But be aware that strings in double-quotes are parsed differently than those
  5506.  enclosed in single-quotes.  The major difference is that backslashes may need
  5507.  to be doubled when in double-quoted strings.
  5508.  
  5509.  Examples (these are hard to describe in words---try them!):
  5510.        set xlabel 'Time (10^6 {/Symbol m}s)'
  5511.        set title '{/Symbol=18 \362@_{/=9.6 0}^{/=12 x}} \
  5512.                   {/Helvetica e^{-{/Symbol m}^2/2} d}{/Symbol m}'
  5513.  
  5514.  The file "ps_guide.ps" in the /docs subdirectory of the `gnuplot` source
  5515.  distribution contains more examples of the enhanced syntax.
  5516.  
  5517. 
  5518. File: gnuplot.info, Node: qms, Prev: postscript, Up: terminal, Next: table
  5519.  
  5520.  The `qms` terminal driver supports the QMS/QUIC Laser printer, the Talaris
  5521.  1200 and others.  It has no options.
  5522.  
  5523. 
  5524. File: gnuplot.info, Node: table, Prev: qms, Up: terminal, Next: tgif
  5525.  
  5526.  Instead of producing a picture, the `table` terminal prints out evaluation
  5527.  results in a multicolumn ASCII table of X Y Z values.  For those times when
  5528.  you really want to see the numbers, now you can see them on the screen or
  5529.  save to a file.  This can be useful if you want to use the contouring engine
  5530.  of `gnuplot` (*note gnuplot:: ) to work out the contours of your data and then
  5531.  save them for further use, perhaps for plotting with `plot`
  5532.  (*note plot:: ).  See  `set contour` (*note contour:: ) for an example.  The
  5533.  same trick can be used to save gridded data (`set dgrid3d`
  5534.  (*note dgrid3d:: )).
  5535.  
  5536.  
  5537. 
  5538. File: gnuplot.info, Node: tgif, Prev: table, Up: terminal, Next: tkcanvas
  5539.  
  5540.  Tgif is an X11-based drawing tool---it has nothing to do with GIF.
  5541.  
  5542.  The `tgif` driver supports different pointsizes (with `set pointsize`
  5543.  (*note pointsize:: )), different label fonts and font sizes (e.g. `set label
  5544.  "Hallo" at x,y font "Helvetica,34"`) and multiple graphs on the page.  The
  5545.  proportions of the axes are not changed.
  5546.  
  5547.  Syntax:
  5548.        set terminal tgif {portrait | landscape} {<[x,y]>}
  5549.                          {solid | dashed}
  5550.                          {"<fontname>"} {<fontsize>}
  5551.  
  5552.  where <[x,y]> specifies the number of graphs in the x and y directions on the
  5553.  page, "<fontname>" is the name of a valid PostScript font, and <fontsize>
  5554.  specifies the size of the PostScript font.  Defaults are `portrait`, `[1,1]`,
  5555.  `dashed`, `"Helvetica"`, and `18`.
  5556.  
  5557.  The `solid` option is usually prefered if lines are colored, as they often
  5558.  are in the editor.  Hardcopy will be black-and-white, so `dashed` should be
  5559.  chosen for that.
  5560.  
  5561.  Multiplot is implemented in two different ways.
  5562.  
  5563.  The first multiplot implementation is the standard gnuplot multiplot feature:
  5564.  
  5565.        set terminal tgif
  5566.        set output "file.obj"
  5567.        set multiplot
  5568.        set origin x01,y01
  5569.        set size  xs,ys
  5570.        plot ...
  5571.             ...
  5572.        set origin x02,y02
  5573.        plot ...
  5574.        set nomultiplot
  5575.  
  5576.  See `set multiplot` (*note multiplot:: ) for further information.
  5577.  
  5578.  The second version is the [x,y] option for the driver itself.  The advantage
  5579.  of this implementation is that everything is scaled and placed automatically
  5580.  without the need for setting origins and sizes; the graphs keep their natural
  5581.  x/y proportions of 3/2 (or whatever is fixed by `set size` (*note size:: )).
  5582.  
  5583.  If both multiplot methods are selected, the standard method is chosen and a
  5584.  warning message is given.
  5585.  
  5586.  Examples of single plots (or standard multiplot):
  5587.        set terminal tgif                  # defaults
  5588.        set terminal tgif "Times-Roman" 24
  5589.        set terminal tgif landscape
  5590.        set terminal tgif landscape solid
  5591.  
  5592.  Examples using the built-in multiplot mechanism:
  5593.        set terminal tgif portrait [2,4]  # portrait; 2 plots in the x-
  5594.                                          # and 4 in the y-direction
  5595.        set terminal tgif [1,2]           # portrait; 1 plot in the x-
  5596.                                          # and 2 in the y-direction
  5597.        set terminal tgif landscape [3,3] # landscape; 3 plots in both
  5598.                                          # directions
  5599.  
  5600. 
  5601. File: gnuplot.info, Node: tkcanvas, Prev: tgif, Up: terminal, Next: vx384
  5602.  
  5603.  This terminal driver generates tk canvas widget commands.  To use it, rebuild
  5604.  `gnuplot` (*note gnuplot:: ) (after uncommenting or inserting the appropriate
  5605.  line in "term.h"), then
  5606.  
  5607.   gnuplot> set term tkcanvas
  5608.   gnuplot> set output 'plot.file'
  5609.  
  5610.  After invoking "wish", execute the following sequence of tcl commands:
  5611.  
  5612.   % source plot.file
  5613.   % canvas .c
  5614.   % pack .c
  5615.   % gnuplot .c
  5616.  
  5617.  The code generated by `gnuplot` creates a tcl procedure called "gnuplot"
  5618.  that takes the name of a canvas as its argument.  When the procedure is,
  5619.  called, it clears the canvas, finds the size of the canvas and draws the plot
  5620.  in it, scaled to fit.
  5621.  
  5622.  The current version of `tkcanvas` supports neither `multiplot`
  5623.  (*note multiplot:: ) nor  `replot` (*note replot:: ).
  5624.  
  5625.  
  5626. 
  5627. File: gnuplot.info, Node: vx384, Prev: tkcanvas, Up: terminal, Next: epson-180dpi
  5628.  
  5629.  The `vx384` terminal driver supports the Vectrix 384 and Tandy color
  5630.  printers.  It has no options.
  5631.  
  5632. 
  5633. File: gnuplot.info, Node: epson-180dpi, Prev: vx384, Up: terminal, Next: latex
  5634.  
  5635.  This driver supports a family of Epson printers and derivatives.
  5636.  
  5637.  `epson-180dpi` and `epson-60dpi` are drivers for Epson LQ-style 24-pin
  5638.  printers with resolutions of 180 and 60 dots per inch, respectively.
  5639.  
  5640.  `epson-lx800` is a generic 9-pin driver appropriate for printers like the
  5641.  Epson LX-800, the Star NL-10 and NX-1000, the PROPRINTER, and so forth.
  5642.  
  5643.  `nec-cp6` is generix 24-pin driver that can be used for printers like the
  5644.  NEC CP6 and the Epson LQ-800.
  5645.  
  5646.  The `okidata` driver supports the 9-pin OKIDATA 320/321 Standard printers.
  5647.  
  5648.  The `starc` driver is for the Star Color Printer.
  5649.  
  5650.  The `tandy-60dpi` driver is for the Tandy DMP-130 series of 9-pin, 60-dpi
  5651.  printers.
  5652.  
  5653.  Only `nec-cp6` has any options.
  5654.  Syntax:
  5655.        set terminal nec-cp6 {monochrome | colour | draft}
  5656.  
  5657.  which defaults to monochrome.
  5658.  With each of these drivers, a binary copy is required on a PC to print.  Do
  5659.  not use `print` (*note print:: )---use instead copy file /b lpt1:.
  5660.  
  5661.  
  5662. 
  5663. File: gnuplot.info, Node: latex, Prev: epson-180dpi, Up: terminal, Next: pslatex and pstex
  5664.  
  5665.  The `latex` and `emtex` drivers allow two options.
  5666.  
  5667.  Syntax:
  5668.        set terminal latex | emtex {courier | roman} {<fontsize>}
  5669.  
  5670.  `fontsize` (*note fontsize:: ) may be any size you specify.  The default is
  5671.  10-point Roman.
  5672.  
  5673.  Unless your driver is capable of building fonts at any size (e.g. dvips),
  5674.  stick to the standard 10, 11 and 12 point sizes.
  5675.  
  5676.  METAFONT users beware: METAFONT does not like odd sizes.
  5677.  
  5678. 
  5679. File: gnuplot.info, Node: pslatex and pstex, Prev: latex, Up: terminal, Next: eepic
  5680.  
  5681.  The `pslatex` and `pstex` drivers generate output for further processing by
  5682.  LaTeX and TeX, respectively.  Figures generated by `pstex` can be included
  5683.  in any plain-based format (including LaTeX).
  5684.  
  5685.  Syntax:
  5686.        set terminal pslatex | |pstex {<color>} {<dashed>} {<rotate>}
  5687.                                      {auxfile} {<font_size>}
  5688.  
  5689.  <color> is either `color` or `monochrome`.  <rotate> is either `rotate`
  5690.  (*note rotate:: ) or `norotate` and determines if the y-axis label is
  5691.  rotated.  <font_size> is used to scale the font from its usual size.
  5692.  
  5693.  If `auxfile` is specified, it directs the driver to put the PostScript
  5694.  commands into an auxiliary file instead of directly into the LaTeX file.
  5695.  This is useful if your pictures are large enough that dvips cannot handle
  5696.  them.  The name of the auxiliary PostScript file is derived from the name of
  5697.  the TeX file given on the `set output` (*note output:: ) command; it is
  5698.  determined by replacing the trailing `.tex` (actually just the final extent in
  5699.  the file name---and the option will be turned off if there is no extent) with
  5700.  `.ps` in the output file name.  Remember to close the file before leaving
  5701.  `gnuplot` (*note gnuplot:: ).
  5702.  
  5703.  Examples:
  5704.        set term pslatex monochrome dashed rotate       # set to defaults
  5705.  To write the PostScript commands into the file "foo.ps":
  5706.        set term pslatex auxfile
  5707.        set output "foo.tex"; plot ...: set output
  5708.  
  5709. 
  5710. File: gnuplot.info, Node: eepic, Prev: pslatex and pstex, Up: terminal, Next: tpic
  5711.  
  5712.  The `eepic` terminal driver supports the extended LaTeX picture environment.
  5713.  It is an alternative to the `latex` (*note latex:: ) driver.
  5714.  
  5715.  The output of this terminal is intended for use with the "eepic.sty" macro
  5716.  package for LaTeX.  To use it, you need "eepic.sty", "epic.sty" and a
  5717.  printer driver that supports the "tpic" \specials.  If your printer driver
  5718.  doesn't support those \specials, "eepicemu.sty" will enable you to use some
  5719.  of them.
  5720.  
  5721.  Although dotted and dashed lines are possible with `eepic` and are tempting,
  5722.  they do not work well for high-sample-rate curves, fusing the dashes all
  5723.  together into a solid line.  For now, the `eepic` driver creates only solid
  5724.  lines.  There is another gnuplot driver (`tpic` (*note tpic:: )) that supports
  5725.  dashed lines, but it cannot be used if your DVI driver doesn't support "tpic"
  5726.  \specials.
  5727.  
  5728.  The `eepic` terminal has no options.
  5729.  
  5730. 
  5731. File: gnuplot.info, Node: tpic, Prev: eepic, Up: terminal, Next: pstricks
  5732.  
  5733.  The `tpic` terminal driver supports the LaTeX picture environment with tpic
  5734.  \specials.  It is an alternative to the `latex` (*note latex:: ) and  `eepic`
  5735.  (*note eepic:: ) terminal drivers. Options are the point size, line width, and
  5736.  dot-dash interval.
  5737.  
  5738.  Syntax:
  5739.        set terminal tpic <pointsize> <linewidth> <interval>
  5740.  
  5741.  where `pointsize` (*note pointsize:: ) and  `linewidth` (*note linewidth:: )
  5742.  are integers in milli-inches and interval is a float in inches.  If a
  5743.  non-positive value is specified, the default is chosen: pointsize = 40,
  5744.  linewidth = 6, interval = 0.1.
  5745.  
  5746.  
  5747. 
  5748. File: gnuplot.info, Node: pstricks, Prev: tpic, Up: terminal, Next: texdraw
  5749.  
  5750.  The `pstricks` driver is intended for use with the "pstricks.sty" macro
  5751.  package for LaTeX.  It is an alternative to the `eepic` (*note eepic:: ) and
  5752.   `latex` (*note latex:: ) drivers. You need "pstricks.sty", and, of course, a
  5753.  printer that understands PostScript.  Ghostscript understands PostScript,
  5754.  too.
  5755.  
  5756.  PSTricks is available via anonymous ftp from the /pub directory at
  5757.  Princeton.EDU.  This driver definitely does not come close to using the full
  5758.  capability of the PSTricks package.
  5759.  
  5760.  Syntax:
  5761.        set terminal pstricks {hacktext | nohacktext} {unit | nounit}
  5762.  
  5763.  The first option invokes an ugly hack that gives nicer numbers; the second
  5764.  has to do with plot scaling.  The defaults are `hacktext` and `nounit`.
  5765.  
  5766. 
  5767. File: gnuplot.info, Node: texdraw, Prev: pstricks, Up: terminal, Next: mf
  5768.  
  5769.  The `texdraw` terminal driver supports the LaTeX texdraw environment.  It is
  5770.  intended for use with "texdraw.sty" and "texdraw.tex" in the texdraw package.
  5771.   It has no options.
  5772.  
  5773. 
  5774. File: gnuplot.info, Node: mf, Prev: texdraw, Up: terminal, Next: METAFONT Instructions
  5775.  
  5776.  The `mf` terminal driver creates a input file to the METAFONT program.  Thus a
  5777.  figure may be used in the TeX document in the same way as is a character.
  5778.  
  5779.  To use a picture in a document, the METAFONT program must be run with the
  5780.  output file from `gnuplot` (*note gnuplot:: ) as input.  Thus, the user needs
  5781.  a basic knowledge of the font creating process and the procedure for including
  5782.  a new font in a document.  However, if the METAFONT program is set up properly
  5783.  at the local site, an unexperienced user could perform the operation without
  5784.  much trouble.
  5785.  
  5786.  The text support is based on a METAFONT character set.  Currently the
  5787.  Computer Modern Roman font set is input, but the user is in principal free to
  5788.  chose whatever fonts he or she needs.  The METAFONT source files for the
  5789.  chosen font must be available.  Each character is stored in a separate
  5790.  picture variable in METAFONT.  These variables may be manipulated (rotated,
  5791.  scaled etc.) when characters are needed.  The drawback is the interpretation
  5792.  time in the METAFONT program.  On some machines (i.e. PC) the limited amount
  5793.  of memory available may also cause problems if too many pictures are stored.
  5794.  
  5795.  The `mf` terminal has no options.
  5796.  
  5797. * Menu:
  5798.  
  5799. * METAFONT Instructions::
  5800.  
  5801. 
  5802. File: gnuplot.info, Node: METAFONT Instructions, Prev: mf, Up: mf
  5803.  
  5804.  
  5805.  - Set your terminal to METAFONT:
  5806.    set terminal mf
  5807.  - Select an output-file, e.g.:
  5808.    set output "myfigures.mf"
  5809.  - Create your pictures. Each picture will generate a separate character. Its
  5810.  default size will be 5*3 inches. You can change the size by saying `set size
  5811.  0.5,0.5` or whatever fraction of the default size you want to have.
  5812.  
  5813.  - Quit `gnuplot` (*note gnuplot:: ).
  5814.  
  5815.  - Generate a TFM and GF file by running METAFONT on the output of `gnuplot`.
  5816.  Since the picture is quite large (5*3 in), you will have to use a version of
  5817.  METAFONT that has a value of at least 150000 for memmax.  On Unix systems
  5818.  these are conventionally installed under the name bigmf.  For the following
  5819.  assume that the command virmf stands for a big version of METAFONT.  For
  5820.  example:
  5821.  
  5822.  - Invoke METAFONT:
  5823.      virmf '&plain'
  5824.  - Select the output device: At the METAFONT prompt ('*') type:
  5825.      \mode:=CanonCX;     % or whatever printer you use
  5826.  - Optionally select a magnification:
  5827.      mag:=1;             % or whatever you wish
  5828.  - Input the `gnuplot`-file:
  5829.      input myfigures.mf
  5830.  On a typical Unix machine there will usually be a script called "mf" that
  5831.  executes virmf '&plain', so you probably can substitute mf for virmf &plain.
  5832.  This will generate two files: mfput.tfm and mfput.$$$gf (where $$$ indicates
  5833.  the resolution of your device).  The above can be conveniently achieved by
  5834.  typing everything on the command line, e.g.:
  5835.  virmf '&plain' '\mode:=CanonCX; mag:=1; input myfigures.mf'
  5836.  In this case the output files will be named myfigures.tfm and
  5837.  myfigures.300gf.
  5838.  
  5839.  - Generate a PK file from the GF file using gftopk:
  5840.    gftopk myfigures.300gf myfigures.300pk
  5841.  The name of the output file for gftopk depends on the DVI driver you use.
  5842.  Ask your local TeX administrator about the naming conventions.  Next, either
  5843.  install the TFM and PK files in the appropriate directories, or set your
  5844.  environment variables properly.  Usually this involves setting TEXFONTS to
  5845.  include the current directory and doing the same thing for the environment
  5846.  variable that your DVI driver uses (no standard name here...).  This step is
  5847.  necessary so that TeX will find the font metric file and your DVI driver will
  5848.  find the PK file.
  5849.  
  5850.  - To include your pictures in your document you have to tell TeX the font:
  5851.    \font\gnufigs=myfigures
  5852.  Each picture you made is stored in a single character.  The first picture is
  5853.  character 0, the second is character 1, and so on...  After doing the above
  5854.  step, you can use the pictures just like any other characters.  Therefore, to
  5855.  place pictures 1 and 2 centered in your document, all you have to do is:
  5856.    \centerline{\gnufigs\char0}
  5857.    \centerline{\gnufigs\char1}
  5858.  in plain TeX.  For LaTeX you can, of course, use the picture environment and
  5859.  place the picture wherever you wish by using the \makebox and \put macros.
  5860.  
  5861.  This conversion saves you a lot of time once you have generated the font;
  5862.  TeX handles the pictures as characters and uses minimal time to place them,
  5863.  and the documents you make change more often than the pictures do.  It also
  5864.  saves a lot of TeX memory.  One last advantage of using the METAFONT driver
  5865.  is that the DVI file really remains device independent, because no \special
  5866.  commands are used as in the eepic and tpic drivers.
  5867.  
  5868. 
  5869. File: gnuplot.info, Node: tics, Prev: terminal, Up: set-show, Next: ticslevel
  5870.  
  5871.  The `set tics` command can be used to change the tics to be drawn outwards.
  5872.  
  5873.  Syntax:
  5874.        set tics {<direction>}
  5875.        show tics
  5876.  
  5877.  where <direction> may be `in` (the default) or `out`.
  5878.  
  5879.  See also `set xtics` (*note xtics:: ) for more control of major (labelled) tic
  5880.  marks and set mxtics` for control of minor tic marks.
  5881.  
  5882.  
  5883. 
  5884. File: gnuplot.info, Node: ticslevel, Prev: tics, Up: set-show, Next: ticscale
  5885.  
  5886.  Using `splot` (*note splot:: ), one can adjust the relative height of the
  5887.  vertical (Z) axis using `set ticslevel`.  The numeric argument provided
  5888.  specifies the location of the bottom of the scale (as a fraction of the
  5889.  z-range) above the xy-plane. The default value is 0.5.  Negative values are
  5890.  permitted, but tic labels on the three axes may overlap.
  5891.  
  5892.  To place the xy-plane at a position 'pos' on the z-axis, `ticslevel` should
  5893.  be set equal to  (pos - zmin) / (zmin - zmax).
  5894.  
  5895.  Syntax:
  5896.        set ticslevel {<level>}
  5897.        show tics
  5898.  
  5899.  See also `set view` (*note view:: ).
  5900.  
  5901.  
  5902. 
  5903. File: gnuplot.info, Node: ticscale, Prev: ticslevel, Up: set-show, Next: timestamp
  5904.  
  5905.  The size of the tic marks can be adjusted with `set ticscale`.
  5906.  
  5907.  Syntax:
  5908.        set ticscale {<major> {<minor>}}
  5909.        show tics
  5910.  
  5911.  If <minor> is not specified, it is 0.5*<major>.  The default size is 1.0 for
  5912.  major tics and 0.5 for minor tics.  Note that it is possible to have the tic
  5913.  marks pointing outward by specifying a negative size.
  5914.  
  5915. 
  5916. File: gnuplot.info, Node: timestamp, Prev: ticscale, Up: set-show, Next: timefmt
  5917.  
  5918.  The command `set timestamp` places the time and date of the plot in the left
  5919.  margin.
  5920.  
  5921.  Syntax:
  5922.        set timestamp {"<format>"} {top|bottom} {{no}rotate}
  5923.                      {<xoff>}{,<yoff>} {"<font>"}
  5924.        set notimestamp
  5925.        show timestamp
  5926.  
  5927.  The format string allows you to choose the format used to write the date and
  5928.  time.  Its default value is what asctime() uses: "%a %b %d %H:%M:%S %Y"
  5929.  (weekday, month name, day of the month, hours, minutes, seconds, four-digit
  5930.  year).  With `top` or `bottom` you can place the timestamp at the top or
  5931.  bottom of the left margin (default: bottom).  `rotate` (*note rotate:: ) lets
  5932.  you write the timestamp vertically, if your terminal supports vertical
  5933.  text.  The constants <xoff> and <off> are offsets from the default position
  5934.  given in character screen coordinates.  <font> is used to specify the font
  5935.  with which the time is to be written.
  5936.  
  5937.  The abbreviation `time` may be used in place of `timestamp`.
  5938.  
  5939.  Example:
  5940.        set timestamp "%d/%m/%y %H:%M" 80,-2 "Helvetica"
  5941.  
  5942.  See `set timefmt` (*note timefmt:: ) for more information about time format
  5943.  strings.
  5944.  
  5945.  
  5946. 
  5947. File: gnuplot.info, Node: timefmt, Prev: timestamp, Up: set-show, Next: title
  5948.  
  5949.  This command applies to timeseries where data are composed of dates/times.
  5950.  It has no meaning unless the command `set xdata time` is given also.
  5951.  
  5952.  Syntax:
  5953.        set timefmt "<format string>"
  5954.        show timefmt
  5955.  
  5956.  The string argument tells `gnuplot` (*note gnuplot:: ) how to read timedata
  5957.  from the datafile. The valid formats are:
  5958.  
  5959.        Format       Explanation
  5960.        %d           day of the month, 1--31
  5961.        %m           month of the year, 1--12
  5962.        %y           year, 0--99
  5963.        %Y           year, 4-digit
  5964.        %j           day of the year, 1--365
  5965.        %H           hour, 0--24
  5966.        %M           minute, 0--60
  5967.        %S           second, 0--60
  5968.        %b           three-character abbreviation of the name of the month
  5969.        %B           name of the month
  5970.  Any character is allowed in the string, but must match exactly.  \t (tab) is
  5971.  recognized.  Backslash-octals (\nnn) are converted to char.  If there is no
  5972.  separating character between the date/time elements, then %d, %m, %y, %H, %M
  5973.  and %S read two digits each, %Y reads four digits and %j reads three digits.
  5974.  %b requires three characters, and %B requires as many as it needs.
  5975.  
  5976.  Spaces are treated slightly differently.  A space in the string stands for
  5977.  zero or more whitespace characters in the file.  That is, "%H %M" can be used
  5978.  to read "1220" and "12     20" as well as "12 20".
  5979.  
  5980.  Each set of non-blank characters in the timedata counts as one column in the
  5981.  `using n:n` specification.  Thus `11:11  25/12/76  21.0` consists of three
  5982.  columns.  To avoid confusion, `gnuplot` requires that you provide a complete
  5983.  `using` (*note using:: ) specification if your file contains timedata.
  5984.  
  5985.  Since `gnuplot` cannot read non-numerical text, if the date format includes
  5986.  the day or month in words, the format string must exclude this text.  But
  5987.  it can still be printed with the "%a", "%A", "%b", or "%B" specifier: see
  5988.  `set format` (*note format:: ) for more details about these and other options
  5989.  for printing timedata.  (`gnuplot` will determine the proper month and weekday
  5990.  from the numerical values.)
  5991.  
  5992.  See also `set xdata` (*note xdata:: ) and Time/date for more information.
  5993.  
  5994.  Example:
  5995.        set timefmt "%d/%m/%Y\t%H:%M"
  5996.  tells `gnuplot` to read date and time separated by tab.  (But look closely at
  5997.  your data---what began as a tab may have been converted to spaces somewhere
  5998.  along the line; the format string must match what is actually in the file.)
  5999.  
  6000. 
  6001. File: gnuplot.info, Node: title, Prev: timefmt, Up: set-show, Next: tmargin
  6002.  
  6003.  The `set title` command produces a plot title that is centered at the top of
  6004.  the plot.  `set title` is a special case of `set label` (*note label:: ).
  6005.  
  6006.  Syntax:
  6007.        set title {"<title-text>"} {<xoff>}{,<yoff>} {"<font>,{<size>}"}
  6008.        show title
  6009.  
  6010.  Specifying constants <xoff> or <yoff> as optional offsets for the title will
  6011.  move the title <xoff> or <yoff> character screen coordinates (not graph
  6012.  coordinates).  For example, "`set title ,-1`" will change only the y offset
  6013.  of the title, moving the title down by roughly the height of one character.
  6014.  
  6015.  <font> is used to specify the font with which the title is to be written;
  6016.  the units of the font <size> depend upon which terminal is used.
  6017.  
  6018.  `set title` with no parameters clears the title.
  6019.  
  6020.  See `syntax` (*note Syntax:: ) for details about the processing of backslash
  6021.  sequences and the distinction between single- and double-quotes.
  6022.  
  6023.  
  6024. 
  6025. File: gnuplot.info, Node: tmargin, Prev: title, Up: set-show, Next: trange
  6026.  
  6027.  The command `set tmargin` sets the size of the top margin.  Please see
  6028.  `set margin` (*note margin:: ) for details.
  6029.  
  6030.  
  6031. 
  6032. File: gnuplot.info, Node: trange, Prev: tmargin, Up: set-show, Next: urange
  6033.  
  6034.  The `set trange` command sets the parametric range used to compute x and y
  6035.  values when in parametric or polar modes.  Please see `set xrange`
  6036.  (*note xrange:: ) for details.
  6037.  
  6038.  
  6039. 
  6040. File: gnuplot.info, Node: urange, Prev: trange, Up: set-show, Next: variables
  6041.  
  6042.  The `set urange` and `set vrange` (*note vrange:: ) commands set the
  6043.  parametric ranges used to compute x, y, and z values when in `splot`
  6044.  (*note splot:: ) parametric mode.  Please see `set xrange` (*note xrange:: )
  6045.  for details.
  6046.  
  6047.  
  6048. 
  6049. File: gnuplot.info, Node: variables, Prev: urange, Up: set-show, Next: view
  6050.  
  6051.  The `show variables` command lists all user-defined variables and their
  6052.  values.
  6053.  
  6054.  Syntax:
  6055.        show variables
  6056.  
  6057. 
  6058. File: gnuplot.info, Node: view, Prev: variables, Up: set-show, Next: vrange
  6059.  
  6060.  The `set view` command sets the viewing angle for `splot`s
  6061.  (*note splot:: ).  It controls how the 3-d coordinates of the plot are mapped
  6062.  into the 2-d screen space.  It provides controls for both rotation and scaling
  6063.  of the plotted data, but supports orthographic projections only.
  6064.  
  6065.  Syntax:
  6066.        set view <rot_x> {,{<rot_z>}{,{<scale>}{,<scale_z>}}}
  6067.        show view
  6068.  
  6069.  where <rot_x> and <rot_z> control the rotation angles (in degrees) in a
  6070.  virtual 3-d coordinate system aligned with the screen such that initially
  6071.  (that is, before the rotations are performed) the screen horizontal axis is
  6072.  x, screen vertical axis is y, and the axis perpendicular to the screen is z.
  6073.  The first rotation applied is <rot_x> around the x axis.  The second rotation
  6074.  applied is <rot_z> around the new z axis.
  6075.  
  6076.  <rot_x> is bounded to the [0:180] range with a default of 60 degrees, while
  6077.  <rot_z> is bounded to the [0:360] range with a default of 30 degrees.
  6078.  <scale> controls the scaling of the entire `splot`, while <scale_z> scales
  6079.  the z axis only.  Both scales default to 1.0.
  6080.  
  6081.  Examples:
  6082.        set view 60, 30, 1, 1
  6083.        set view ,,0.5
  6084.  
  6085.  The first sets all the four default values.  The second changes only scale,
  6086.  to 0.5.
  6087.  
  6088.  See also `set ticslevel` (*note ticslevel:: ).
  6089.  
  6090.  
  6091. 
  6092. File: gnuplot.info, Node: vrange, Prev: view, Up: set-show, Next: x2data
  6093.  
  6094.  The `set urange` (*note urange:: ) and set vrange commands set the parametric
  6095.  ranges used to compute x, y, and z values when in `splot` (*note splot:: )
  6096.  parametric mode.  Please see `set xrange` (*note xrange:: ) for details.
  6097.  
  6098.  
  6099. 
  6100. File: gnuplot.info, Node: x2data, Prev: vrange, Up: set-show, Next: x2dtics
  6101.  
  6102.  The `set x2data` command sets data on the x2 (top) axis to timeseries
  6103.  (dates/times).  Please see `set xdata` (*note xdata:: ).
  6104.  
  6105.  
  6106. 
  6107. File: gnuplot.info, Node: x2dtics, Prev: x2data, Up: set-show, Next: x2label
  6108.  
  6109.  The `set x2dtics` command changes tics on the x2 (top) axis to days of the
  6110.  week.  Please see `set xmtics` (*note xmtics:: ) for details.
  6111.  
  6112.  
  6113. 
  6114. File: gnuplot.info, Node: x2label, Prev: x2dtics, Up: set-show, Next: x2mtics
  6115.  
  6116.  The `set x2label` command sets the label for the x2 (top) axis.  Please see
  6117.  `set xlabel` (*note xlabel:: ).
  6118.  
  6119.  
  6120. 
  6121. File: gnuplot.info, Node: x2mtics, Prev: x2label, Up: set-show, Next: x2range
  6122.  
  6123.  The `set x2mtics` command changes tics on the x2 (top) axis to months of the
  6124.  year.  Please see `set xmtics` (*note xmtics:: ) for details.
  6125.  
  6126.  
  6127. 
  6128. File: gnuplot.info, Node: x2range, Prev: x2mtics, Up: set-show, Next: x2tics
  6129.  
  6130.  The `set x2range` command sets the horizontal range that will be displayed on
  6131.  the x2 (top) axis.  Please see `set xrange` (*note xrange:: ) for details.
  6132.  
  6133.  
  6134. 
  6135. File: gnuplot.info, Node: x2tics, Prev: x2range, Up: set-show, Next: x2zeroaxis
  6136.  
  6137.  The `set x2tics` command controls major (labelled) tics on the x2 (top) axis.
  6138.  Please see `set xtics` (*note xtics:: ) for details.
  6139.  
  6140.  
  6141. 
  6142. File: gnuplot.info, Node: x2zeroaxis, Prev: x2tics, Up: set-show, Next: xdata
  6143.  
  6144.  The `set x2zeroaxis` command draws a line at the origin of the x2 (top) axis
  6145.  (x2 = 0).  For details, please see
  6146.  `set zeroaxis` (*note zeroaxis:: ).
  6147.  
  6148.  
  6149. 
  6150. File: gnuplot.info, Node: xdata, Prev: x2zeroaxis, Up: set-show, Next: xdtics
  6151.  
  6152.  This command sets the datatype on the x axis to date/time.  A similar command
  6153.  does the same thing for each of the other axes.
  6154.  
  6155.  Syntax:
  6156.        set xdata {time}
  6157.        show xdata
  6158.  
  6159.  The same syntax applies to `ydata` (*note ydata:: ),  `zdata`
  6160.  (*note zdata:: ),  `x2data` (*note x2data:: ) and  `y2data`
  6161.  (*note y2data:: ).
  6162.  
  6163.  The `time` option signals that the datatype is indeed date/time.  If the
  6164.  option is not specified, the datatype reverts to normal.
  6165.  
  6166.  See `set timefmt` (*note timefmt:: ) to tell  `gnuplot` (*note gnuplot:: ) how
  6167.  to read date or time data.  The date/time is converted to seconds from start
  6168.  of the century.  There is currently only one timefmt, which implies that all
  6169.  the date/time columns must confirm to this format.  Specification of ranges
  6170.  should be supplied as quoted strings according to this format to avoid
  6171.  interpretation of the date/time as an expression.
  6172.  
  6173.  The function 'strftime' (type "man strftime" on unix to look it up) is used
  6174.  to print ticmark labels.  `gnuplot` tries to figure out a reasonable format
  6175.  for this  unless the `set format x "string"` has supplied something that does
  6176.  not look like a decimal format (more than one '%' or neither %f nor %g).
  6177.  
  6178.  See also `Time/date` for more information.
  6179.  
  6180. 
  6181. File: gnuplot.info, Node: xdtics, Prev: xdata, Up: set-show, Next: xlabel
  6182.  
  6183.  The `set xdtics` commands converts the x-axis tic marks to days of the week
  6184.  where 0=Sun and 6=Sat.  Overflows are converted modulo 7 to dates.  `set
  6185.  noxdtics` returns the labels to their default values.  Similar commands do
  6186.  the same things for the other axes.
  6187.  
  6188.  Syntax:
  6189.        set xdtics
  6190.        set noxdtics
  6191.        show xdtics
  6192.  
  6193.  The same syntax applies to `ydtics` (*note ydtics:: ),  `zdtics`
  6194.  (*note zdtics:: ),  `x2dtics` (*note x2dtics:: ) and  `y2dtics`
  6195.  (*note y2dtics:: ).
  6196.  
  6197.  See also the `set format` (*note format:: ) command.
  6198.  
  6199.  
  6200. 
  6201. File: gnuplot.info, Node: xlabel, Prev: xdtics, Up: set-show, Next: xmtics
  6202.  
  6203.  The `set xlabel` command sets the x axis label.  Similar commands set labels
  6204.  on the other axes.
  6205.  
  6206.  Syntax:
  6207.        set xlabel {"<label>"} {<xoff>}{,<yoff>} {"<font>{,<size>}"}
  6208.        show xlabel
  6209.  
  6210.  The same syntax applies to `x2label` (*note x2label:: ),  `ylabel`
  6211.  (*note ylabel:: ),  `y2label` (*note y2label:: ) and  `zlabel`
  6212.  (*note zlabel:: ).
  6213.  
  6214.  Specifying the constants <xoff> or <yoff> as optional offsets for a label
  6215.  will move it <xoff> or <yoff> character widths or heights.  For example,
  6216.  "` set xlabel -1`" will change only the x offset of the xlabel, moving the
  6217.  label roughly one character width to the left.   The size of a character
  6218.  depends on both the font and the terminal.
  6219.  
  6220.  <font> is used to specify the font in which the label is written; the units
  6221.  of the font <size> depend upon which terminal is used.
  6222.  
  6223.  To clear a label, put no options on the command line, e.g., "`set y2label`".
  6224.  
  6225.  The default positions of the axis labels are as follows:
  6226.  
  6227.  xlabel:  The x-axis label is centered below the bottom axis.
  6228.  
  6229.  ylabel:  The position of the y-axis label depends on the terminal, and can be
  6230.  one of the following three positions:
  6231.  
  6232.  1. Horizontal text flushed left at the top left of the plot.  Terminals that
  6233.  cannot rotate text will probably use this method.  If `set x2tics`
  6234.  (*note x2tics:: ) is also in use, the ylabel may overwrite the left-most x2tic
  6235.  label.  This may be remedied by adjusting the ylabel position or the left
  6236.  margin.
  6237.  
  6238.  2. Vertical text centered vertically at the left of the plot.  Terminals
  6239.  that can rotate text will probably use this method.
  6240.  
  6241.  3. Horizontal text centered vertically at the left of the plot.  The EEPIC,
  6242.  LaTeX and TPIC drivers use this method.  The user must insert line breaks
  6243.  using \\ to prevent the ylabel from overwriting the plot.  To produce a
  6244.  vertical row of characters, add \\ between every printing character (but this
  6245.  is ugly).
  6246.  
  6247.  zlabel: The z-axis label is centered along the z axis and placed in the space
  6248.  above the grid level.
  6249.  
  6250.  y2label: The y2-axis label is placed to the right of the y2 axis.  The
  6251.  position is terminal-dependent in the same manner as is the y-axis label.
  6252.  
  6253.  x2label: The x2-axis label is placed above the top axis but below the plot
  6254.  title.  It is also possible to create an x2-axis label by using new-line
  6255.  characters to make a multi-line plot title, e.g.,
  6256.  
  6257.        set title "This is the title\n\nThis is the x2label"
  6258.  
  6259.  Note that double quotes must be used.  The same font will be used for both
  6260.  lines, of course.
  6261.  
  6262.  If you are not satisfied with the default position of an axis label, use `set
  6263.  label` instead--that command gives you much more control over where text is
  6264.  placed.
  6265.  
  6266.  Please see `set syntax` for further information about backslash processing
  6267.  and the difference between single- and double-quoted strings.
  6268.  
  6269. 
  6270. File: gnuplot.info, Node: xmtics, Prev: xlabel, Up: set-show, Next: xrange
  6271.  
  6272.  The `set xmtics` commands converts the x-axis tic marks to months of the
  6273.  year where 1=Jan and 12=Dec.  Overflows are converted modulo 12 to months.
  6274.  The tics are returned to their default labels by `set noxmtics`.  Similar
  6275.  commands perform the same duties for the other axes.
  6276.  
  6277.  Syntax:
  6278.        set xmtics
  6279.        set noxmtics
  6280.        show xmtics
  6281.  
  6282.  The same syntax applies to `x2mtics` (*note x2mtics:: ),  `ymtics`
  6283.  (*note ymtics:: ),  `y2mtics` (*note y2mtics:: ), and  `zmtics`
  6284.  (*note zmtics:: ).
  6285.  
  6286.  See also the `set format` (*note format:: ) command.
  6287.  
  6288.  
  6289. 
  6290. File: gnuplot.info, Node: xrange, Prev: xmtics, Up: set-show, Next: xtics
  6291.  
  6292.  The `set xrange` command sets the horizontal range that will be displayed.
  6293.  A similar command exists for each of the other axes, as well as for the
  6294.  polar radius r and the parametric variables t, u, and v.
  6295.  
  6296.  Syntax:
  6297.        set xrange [{{<min>}:{<max>}}] {{no}reverse} {{no}writeback}
  6298.        show xrange
  6299.  
  6300.  where <min> and <max> terms are constants, expressions or an asterisk to set
  6301.  autoscaling.  If the data are date/time, you must give the range as a quoted
  6302.  string according to the `set timefmt` (*note timefmt:: ) format.  Any value
  6303.  omitted will not be changed.
  6304.  
  6305.  The same syntax applies to `yrange` (*note yrange:: ),  `zrange`
  6306.  (*note zrange:: ),  `x2range` (*note x2range:: ),  `y2range`
  6307.  (*note y2range:: ), `rrange` (*note rrange:: ),  `trange` (*note trange:: ),
  6308.   `urange` (*note urange:: ) and  `vrange` (*note vrange:: ).
  6309.  
  6310.  The `reverse` option reverses the direction of the axis, e.g., `set xrange
  6311.  [0:1] reverse` will produce an axis with 1 on the left and 0 on the right.
  6312.  This is identical to the axis produced by `set xrange [1:0]`, of course.
  6313.  `reverse` is intended primarily for use with `autoscale`
  6314.  (*note autoscale:: ).
  6315.  
  6316.  The `writeback` option essentially saves the range found by `autoscale` in
  6317.  the buffers that would be filled by `set xrange`.  This is useful if you wish
  6318.  to plot several functions together but have the range determined by only
  6319.  some of them.  The `writeback` operation is performed during the `plot`
  6320.  (*note plot:: ) execution, so it must be specified before that command.  For
  6321.  example,
  6322.  
  6323.        set xrange [-10:10]
  6324.        set yrange [] writeback
  6325.        plot sin(x)
  6326.        set noautoscale y
  6327.        replot x/2
  6328.  
  6329.  results in a yrange of [-1:1] as found only from the range of sin(x); the
  6330.  [-5:5] range of x/2 is ignored.  Executing `show yrange` after each command
  6331.  in the above example should help you understand what is going on.
  6332.  
  6333.  In 2-d, `xrange` and `yrange` determine the extent of the axes, `trange`
  6334.  determines the range of the parametric variable in parametric mode or the
  6335.  range of the angle in polar mode.  Similarly in parametric 3-d, `xrange`,
  6336.  `yrange`, and `zrange` govern the axes and `urange` and `vrange` govern the
  6337.  parametric variables.
  6338.  
  6339.  In polar mode, `rrange` determines the radial range plotted.  <rmin> acts as
  6340.  an additive constant to the radius, whereas <rmax> acts as a clip to the
  6341.  radius---no point with radius greater than <rmax> will be plotted.  `xrange`
  6342.  and `yrange` are affected---the ranges can be set as if the graph was of
  6343.  r(t)-rmin, with rmin added to all the labels.
  6344.  
  6345.  Any range may be partially or totally autoscaled, although it may not make
  6346.  sense to autoscale a parametric variable unless it is plotted with data.
  6347.  
  6348.  Ranges may also be specified on the `plot` command line.  A range given on
  6349.  the plot line will be used for that single `plot` command; a range given by
  6350.  a `set` (*note set-show:: ) command will be used for all subsequent plots that
  6351.  do not specify their own ranges.  The same holds true for `splot`
  6352.  (*note splot:: ).
  6353.  
  6354.  Examples:
  6355.  
  6356.  To set the xrange to the default:
  6357.        set xrange [-10:10]
  6358.  
  6359.  To set the yrange to increase downwards:
  6360.        set yrange [10:-10]
  6361.  
  6362.  To change zmax to 10 without affecting zmin (which may still be autoscaled):
  6363.        set zrange [:10]
  6364.  
  6365.  To autoscale xmin while leaving xmax unchanged:
  6366.        set xrange [*:]
  6367.  
  6368. 
  6369. File: gnuplot.info, Node: xtics, Prev: xrange, Up: set-show, Next: xzeroaxis
  6370.  
  6371.  Fine control of the major (labelled) tics on the x axis is possible with the
  6372.  `set xtics` command.  The tics may be turned off with the `set noxtics`
  6373.  command, and may be turned on (the default state) with `set xtics`.  Similar
  6374.  commands control the major tics on the y, z, x2 and y2 axes.
  6375.  
  6376.  Syntax:
  6377.        set xtics {axis | border} {{no}mirror} {{no}rotate}
  6378.                  {  <incr>
  6379.                   | <start>, <incr> {,<end>}
  6380.                   | ({"<label>"} <pos> {,{"<label>"} <pos>}...) }
  6381.        set noxtics
  6382.        show xtics
  6383.  
  6384.  The same syntax applies to `ytics` (*note ytics:: ),  `ztics`
  6385.  (*note ztics:: ),  `x2tics` (*note x2tics:: ) and  `y2tics`
  6386.  (*note y2tics:: ).
  6387.  
  6388.  `axis` or `border` (*note border:: ) tells  `gnuplot` (*note gnuplot:: ) to
  6389.  put the tics (both the tics themselves and the accompanying labels) along the
  6390.  axis or the border, respectively. `mirror` tells it to put unlabelled tics at
  6391.  the same positions on the opposite border.  `nomirror` does what you think it
  6392.  does.  `rotate` (*note rotate:: ) asks `gnuplot` to rotate the text through 90
  6393.  degrees, if the underlying terminal driver supports text rotation.  `norotate`
  6394.  cancels this.  The defaults are `border mirror norotate` for tics on the x, y,
  6395.  x2, and y2 axes.  For the z axis, the the `{axis | border}` option is not
  6396.  available and the default is `nomirror`.  If you do want to mirror the z-axis
  6397.  tics, you might want to create a bit more room for them with `set border`.
  6398.  
  6399.  The positions of the tics may be specified in either of two forms:
  6400.  
  6401.  The <start>, <incr>, <end> form specifies that a series of tics will be
  6402.  plotted on the axis between the values <start> and <end> with an increment of
  6403.  <incr>.  If <end> is not given, it is assumed to be infinity.  The increment
  6404.  may be negative.  If neither <start> nor <end> is given, <start> is assumed
  6405.  to be negative infinity, <end> is assumed to be positive infinity, and the
  6406.  tics will be drawn at multiples of <step>---there will be a tic at zero (if
  6407.  it is within the plotted range).  If the axis is logarithmic, the increment
  6408.  will be used as a multiplicative factor.
  6409.  
  6410.  Examples:
  6411.  
  6412.  Make tics at 0, 0.5, 1, 1.5, ..., 9.5, 10.
  6413.        set xtics 0,.5,10
  6414.  
  6415.  Make tics at ..., -10, -5, 0, 5, 10, ...
  6416.        set xtics 5
  6417.  
  6418.  Make tics at 1, 100, 1e4, 1e6, 1e8.
  6419.        set logscale x; set xtics 1,100,10e8
  6420.  
  6421.  The ("<label>" <pos>, ...) form allows arbitrary tic positions or non-numeric
  6422.  tic labels.  A set of tics is a set of positions, each with its own optional
  6423.  label.  Note that the label is a string enclosed by quotes, and may be a
  6424.  constant string, such as "hello", or contain formatting information for the
  6425.  tic number (which is the same as the position), such as "%3f clients".  See
  6426.  `set format` (*note format:: ) for more information about this case.  The
  6427.  label may be made empty by specifying it as an empty string.  If no string is
  6428.  given, the default label (numerical) is used.  In this form, the tics do not
  6429.  need to be listed in numerical order.
  6430.  
  6431.  Examples:
  6432.        set xtics ("low" 0, "medium" 50, "high" 100)
  6433.        set xtics (1,2,4,8,16,32,64,128,256,512,1024)
  6434.        set ytics ("bottom" 0, "" 10, "top" 20)
  6435.  
  6436.  In the second example, all tics are labelled.  In the third, only the end
  6437.  tics are labelled.
  6438.  
  6439.  Tics will only be plotted when in range.
  6440.  
  6441.  Minor (unlabelled) tics can be added by the `set mxtics` (*note mxtics:: )
  6442.  command.
  6443.  
  6444.  In case of timeseries data, position values must be given as quoted dates
  6445.  or times according to the format `timefmt` (*note timefmt:: ).  If the
  6446.  <start>, <incr>, <end> form is used, <start> and <end> must be given according
  6447.  to `timefmt`, but <incr> must be in seconds.  Times will be written out
  6448.  according to the format given on "set format", however.
  6449.  
  6450.  Examples:
  6451.        set xdata time
  6452.        set timefmt "%d/%m"
  6453.        set format x "%b %d"
  6454.        set xrange ["00/12":"06/12"]
  6455.        set xtics "01/12", 172800, "05/12"
  6456.  
  6457.        set xdata time
  6458.        set timefmt "%d/%m"
  6459.        set format x "%b %d"
  6460.        set xrange ["00/12":"06/12"]
  6461.        set xtics ("01/12", "" "03/12", "05/12")
  6462.  Both of these will produce tics "Dec 1", "Dec 3", and "Dec 5", but in the
  6463.  second example the tic at "Dec 3" will be unlabelled.
  6464.  
  6465.  
  6466. 
  6467. File: gnuplot.info, Node: xzeroaxis, Prev: xtics, Up: set-show, Next: y2data
  6468.  
  6469.  The `set xzeroaxis` command draws a line at x = 0.  For details, please see
  6470.  `set zeroaxis` (*note zeroaxis:: ).
  6471.  
  6472.  
  6473. 
  6474. File: gnuplot.info, Node: y2data, Prev: xzeroaxis, Up: set-show, Next: y2dtics
  6475.  
  6476.  The `set y2data` command sets y2 (right-hand) axis data to timeseries
  6477.  (dates/times).  Please see `set xdata` (*note xdata:: ).
  6478.  
  6479.  
  6480. 
  6481. File: gnuplot.info, Node: y2dtics, Prev: y2data, Up: set-show, Next: y2label
  6482.  
  6483.  The `set y2dtics` command changes tics on the y2 (right-hand) axis to days of
  6484.  the week.  Please see `set xmtics` (*note xmtics:: ) for details.
  6485.  
  6486.  
  6487. 
  6488. File: gnuplot.info, Node: y2label, Prev: y2dtics, Up: set-show, Next: y2mtics
  6489.  
  6490.  The `set y2dtics` (*note y2dtics:: ) command sets the label for the y2
  6491.  (right-hand) axis. Please see `set xlabel` (*note xlabel:: ).
  6492.  
  6493.  
  6494. 
  6495. File: gnuplot.info, Node: y2mtics, Prev: y2label, Up: set-show, Next: y2range
  6496.  
  6497.  The `set y2mtics` command changes tics on the y2 (right-hand) axis to months
  6498.  of the year.  Please see `set xmtics` (*note xmtics:: ) for details.
  6499.  
  6500.  
  6501. 
  6502. File: gnuplot.info, Node: y2range, Prev: y2mtics, Up: set-show, Next: y2tics
  6503.  
  6504.  The `set y2range` command sets the vertical range that will be displayed on
  6505.  the y2 (right-hand) axis.  Please see `set xrange` (*note xrange:: ) for
  6506.  details.
  6507.  
  6508.  
  6509. 
  6510. File: gnuplot.info, Node: y2tics, Prev: y2range, Up: set-show, Next: y2zeroaxis
  6511.  
  6512.  The `set y2tics` command controls major (labelled) tics on the y2 (right-hand)
  6513.  axis.  Please see `set xtics` (*note xtics:: ) for details.
  6514.  
  6515.  
  6516. 
  6517. File: gnuplot.info, Node: y2zeroaxis, Prev: y2tics, Up: set-show, Next: ydata
  6518.  
  6519.  The `set y2zeroaxis` command draws a line at the origin of the y2 (right-hand)
  6520.  axis (y2 = 0).  For details, please see `set zeroaxis` (*note zeroaxis:: ).
  6521.  
  6522.  
  6523. 
  6524. File: gnuplot.info, Node: ydata, Prev: y2zeroaxis, Up: set-show, Next: ydtics
  6525.  
  6526.  Sets y-axis data to timeseries (dates/times).  Please see `set xdata`
  6527.  (*note xdata:: ).
  6528.  
  6529.  
  6530. 
  6531. File: gnuplot.info, Node: ydtics, Prev: ydata, Up: set-show, Next: ylabel
  6532.  
  6533.  The `set ydtics` command changes tics on the y axis to days of the week.
  6534.  Please see `set xmtics` (*note xmtics:: ) for details.
  6535.  
  6536.  
  6537. 
  6538. File: gnuplot.info, Node: ylabel, Prev: ydtics, Up: set-show, Next: ymtics
  6539.  
  6540.  This command sets the label for the y axis.  Please see `set xlabel`
  6541.  (*note xlabel:: ).
  6542.  
  6543.  
  6544. 
  6545. File: gnuplot.info, Node: ymtics, Prev: ylabel, Up: set-show, Next: yrange
  6546.  
  6547.  The `set ymtics` command changes tics on the y axis to months of the year.
  6548.  Please see `set xmtics` (*note xmtics:: ) for details.
  6549.  
  6550.  
  6551. 
  6552. File: gnuplot.info, Node: yrange, Prev: ymtics, Up: set-show, Next: ytics
  6553.  
  6554.  The `set yrange` command sets the vertical range that will be displayed on
  6555.  the y axis.  Please see `set xrange` (*note xrange:: ) for details.
  6556.  
  6557.  
  6558. 
  6559. File: gnuplot.info, Node: ytics, Prev: yrange, Up: set-show, Next: yzeroaxis
  6560.  
  6561.  The `set ytics` command controls major (labelled) tics on the y axis.
  6562.  Please see `set xtics` (*note xtics:: ) for details.
  6563.  
  6564.  
  6565. 
  6566. File: gnuplot.info, Node: yzeroaxis, Prev: ytics, Up: set-show, Next: zdata
  6567.  
  6568.  The `set yzeroaxis` command draws a line at y = 0.  For details, please see
  6569.  `set zeroaxis` (*note zeroaxis:: ).
  6570.  
  6571.  
  6572. 
  6573. File: gnuplot.info, Node: zdata, Prev: yzeroaxis, Up: set-show, Next: zdtics
  6574.  
  6575.  Set zaxis date to timeseries (dates/times).  Please see `set xdata`
  6576.  (*note xdata:: ).
  6577.  
  6578.  
  6579. 
  6580. File: gnuplot.info, Node: zdtics, Prev: zdata, Up: set-show, Next: zero
  6581.  
  6582.  The `set zdtics` command changes tics on the z axis to days of the week.
  6583.  Please see `set xmtics` (*note xmtics:: ) for details.
  6584.  
  6585.  
  6586. 
  6587. File: gnuplot.info, Node: zero, Prev: zdtics, Up: set-show, Next: zeroaxis
  6588.  
  6589.  The `zero` value is the default threshold for values approaching 0.0.
  6590.  
  6591.  Syntax:
  6592.        set zero <expression>
  6593.        show zero
  6594.  
  6595.  `gnuplot` (*note gnuplot:: ) will not plot a point if its imaginary part is
  6596.  greater in magnitude than the `zero` threshold.  Axis ranges cannot be less
  6597.  than `zero`.  The default `zero` value is 1e-8.
  6598.  
  6599.  
  6600. 
  6601. File: gnuplot.info, Node: zeroaxis, Prev: zero, Up: set-show, Next: zlabel
  6602.  
  6603.  The x axis may be drawn by `set xzeroaxis` (*note xzeroaxis:: ) and removed by
  6604.  set noxzeroaxis. Similar commands behave similarly for the y, x2, and y2
  6605.  axes.
  6606.  
  6607.  Syntax:
  6608.        set zeroaxis {<linetype>}
  6609.        set xzeroaxis {<linetype>}
  6610.        set yzeroaxis {<linetype>}
  6611.        set x2zeroaxis {<linetype>}
  6612.        set y2zeroaxis {<linetype>}
  6613.        set nozeroaxis
  6614.        set noxzeroaxis
  6615.        etc.
  6616.        show zeroaxis
  6617.        show xzeroaxis
  6618.        etc.
  6619.  
  6620.  By default, these options are off.  The selected zero axis is drawn with a
  6621.  line of type <linetype> from the default linetype list provided by the
  6622.  terminal; user-defined linetypes (via the `set linestyle` (*note linestyle:: )
  6623.  command) are not accessible for these axes.  If <linetype> is not specified,
  6624.  any zero axes selected will be drawn using the axis linetype (linetype 0).
  6625.  
  6626.  `set zeroaxis l` is equivalent to `set xzeroaxis l; set yzeroaxis l`. `set
  6627.  nozeroaxis` is equivalent to `set noxzeroaxis; set noyzeroaxis`.
  6628.  
  6629. 
  6630. File: gnuplot.info, Node: zlabel, Prev: zeroaxis, Up: set-show, Next: zmtics
  6631.  
  6632.  This command sets the label for the z axis.  Please see `set xlabel`
  6633.  (*note xlabel:: ).
  6634.  
  6635.  
  6636. 
  6637. File: gnuplot.info, Node: zmtics, Prev: zlabel, Up: set-show, Next: zrange
  6638.  
  6639.  The `set zmtics` command changes tics on the z axis to months of the year.
  6640.  Please see `set xmtics` (*note xmtics:: ) for details.
  6641.  
  6642.  
  6643. 
  6644. File: gnuplot.info, Node: zrange, Prev: zmtics, Up: set-show, Next: ztics
  6645.  
  6646.  The `set zrange` command sets the range that will be displayed on the z axis.
  6647.  The zrange is used only by `splot` (*note splot:: ) and is ignored by  `plot`
  6648.  (*note plot:: ).  Please see set xrange` for details.
  6649.  
  6650.  
  6651. 
  6652. File: gnuplot.info, Node: ztics, Prev: zrange, Up: set-show
  6653.  
  6654.  The `set ztics` command controls major (labelled) tics on the z axis.
  6655.  Please see `set xtics` (*note xtics:: ) for details.
  6656.  
  6657.  
  6658. 
  6659. File: gnuplot.info, Node: shell, Prev: set-show, Up: Commands, Next: splot
  6660.  
  6661.  The `shell` command spawns an interactive shell.  To return to `gnuplot`
  6662.  (*note gnuplot:: ), type `logout` if using VMS, `exit` (*note exit:: ) or the
  6663.  END-OF-FILE character if using Unix, `endcli` if using AmigaDOS, or `exit` if
  6664.  using MS-DOS or OS/2.
  6665.  
  6666.  A single shell command may be spawned by preceding it with the ! character
  6667.  ($ if using VMS) at the beginning of a command line.  Control will return
  6668.  immediately to `gnuplot` after this command is executed.  For example, in
  6669.  Unix, AmigaDOS, MS-DOS or OS/2,
  6670.  
  6671.        ! dir
  6672.  
  6673.  prints a directory listing and then returns to `gnuplot`.
  6674.  
  6675.  On an Atari, the `!` command first checks whether a shell is already loaded
  6676.  and uses it, if available.  This is practical if `gnuplot` is run from
  6677.  `gulam`, for example.
  6678.  
  6679. 
  6680. File: gnuplot.info, Node: splot, Prev: shell, Up: Commands, Next: data-file
  6681.  
  6682.  `splot` is the primary command for drawing 3-d plots (well, actually
  6683.  projections on a 2-d surface, but you knew that).  It can create a plot from
  6684.  functions or data in a manner very similar to the `plot` (*note plot:: )
  6685.  command.
  6686.  
  6687.  Please see `plot` for features common to the `plot` command; only differences
  6688.  are discussed in detail here.
  6689.  
  6690.  Syntax:
  6691.        splot {<ranges>}
  6692.              {<function> | {"<datafile>" {datafile-modifiers}}}
  6693.              {<title-spec>} {with <style>}
  6694.              {, {definitions,} <function> ...}
  6695.  
  6696.  where either a <function> or the name of a data file enclosed in quotes is
  6697.  supplied.  A function is a mathematical expression, or a triple (`splot`) of
  6698.  mathematical expressions in parametric mode.
  6699.  
  6700.  By default `splot` draws the xy plane completely below the plotted data.  The
  6701.  offset between the lowest ztic and the xy plane can be changed by `set
  6702.  ticslevel`.  The orientation of a 'splot' is controlled by `set view`
  6703.  (*note view:: ).  See `set view` and `set ticslevel` (*note ticslevel:: ) for
  6704.  more information.
  6705.  
  6706.  The syntax for setting ranges on the `splot` command is the same as for
  6707.  `plot`.  In non-parametric mode, the order in which ranges must be given is
  6708.  `xrange` (*note xrange:: ),  `yrange` (*note yrange:: ), and  `zrange`
  6709.  (*note zrange:: ).  In parametric mode, the order is  `urange`
  6710.  (*note urange:: ), `vrange` (*note vrange:: ), xrange, yrange, and zrange.
  6711.  
  6712.  The `title` (*note title:: ) option is the same as in plot.  The operation of
  6713.  of `with` (*note with:: ) is also the same as in `plot`, except that the
  6714.  plotting styles available to `splot` are limited to `lines` (*note lines:: ),
  6715.   `points` (*note points:: ),  `linespoints` (*note linespoints:: ),  `dots`
  6716.  (*note dots:: ), and  `impulses` (*note impulses:: );  the error-bar
  6717.  capabilities of `plot` are not available for `splot`.
  6718.  
  6719.  The datafile options have more differences.
  6720.  
  6721. * Menu:
  6722.  
  6723. * data-file::
  6724.  
  6725. 
  6726. File: gnuplot.info, Node: data-file, Prev: splot, Up: splot, Next: binary
  6727.  
  6728.  Discrete data contained in a file can be displayed by specifying the name of
  6729.  the data file (enclosed in quotes) on the `plot` (*note plot:: ) or  `splot`
  6730.  (*note splot:: ) command line.
  6731.  
  6732.  Syntax:
  6733.        splot '<file_name>' {binary | matrix}
  6734.                            {index <index list>}
  6735.                            {every <every list>}
  6736.                            {using <using list>}
  6737.  
  6738.  The special filenames `""` and `"-"` are permitted, as in `plot`.
  6739.  
  6740.  In brief, `binary` (*note binary:: ) indicates that the file is binary,
  6741.   `matrix` (*note matrix:: ) indicates that the data are in matrix form,
  6742.  `index` (*note index:: ) selects which data sets in a multi-data-set file are
  6743.  to be plotted, `every` (*note every:: ) specifies which datalines within a
  6744.  single data set are to be plotted, and `using` (*note using:: ) determines how
  6745.  the columns within a single record are to be interpreted.
  6746.  
  6747.  The options `index` and `every` behave the same way as with `plot`.  `using`
  6748.  also does, with the obvious difference that the `using` list must provide
  6749.  three entries instead of two.
  6750.  
  6751.  The `plot` options `thru` (*note thru:: ) and  `smooth` (*note smooth:: ) are
  6752.  not available for splot.
  6753.  
  6754.  Data file organization is essentially the same as for `plot`, except that
  6755.  each point is an (x,y,z) triple.  If only a single value is provided, it will
  6756.  be used for z, the data point number will be used for x, and the y-isoline
  6757.  number will be used for y; thus "`splot 'file' using 1`" is identical to
  6758.  "`splot 'file' using 0:-1:1`".  If two values are provided, `gnuplot`
  6759.  (*note gnuplot:: ) gives you an error message.  Three values are interpreted
  6760.  as an (x,y,z) triple. Additional values are generally used as errors, which
  6761.  can be used by `fit` (*note fit:: ).
  6762.  
  6763.  Single blank records separate datalines (which are interpreted as y-isolines)
  6764.  in a `splot` datafile.  No line will join points separated by a blank record.
  6765.  If all datalines contain the same number of points,`gnuplot` will draw
  6766.  cross-isolines in the opposite direction.  This is termed "grid data", and is
  6767.  required for drawing a surface, for contouring (`set contour`
  6768.  (*note contour:: )) and hidden-line removal (`set hidden3d`
  6769.  (*note hidden3d:: )).
  6770.  
  6771.  It is no longer necessary to specify `parametric` (*note parametric:: ) mode
  6772.  for three-column `splot`s.
  6773.  
  6774.  
  6775. * Menu:
  6776.  
  6777. * binary::
  6778. * example datafile::
  6779. * matrix::
  6780.  
  6781. 
  6782. File: gnuplot.info, Node: binary, Prev: data-file, Up: data-file, Next: example datafile
  6783.  
  6784.  In previous versions, `gnuplot` (*note gnuplot:: ) dynamically detected binary
  6785.  data files.  It is now necessary to specify the keyword `binary` directly
  6786.  after the filename.
  6787.  
  6788.  Single precision floats are stored in a binary file as follows:
  6789.  
  6790.        <N+1>  <y0>   <y1>   <y2>  ...  <yN>
  6791.         <x0> <z0,0> <z0,1> <z0,2> ... <z0,N>
  6792.         <x1> <z1,0> <z1,1> <z1,2> ... <z1,N>
  6793.          :      :      :      :   ...    :
  6794.  
  6795.  
  6796.  which are converted into triplets:
  6797.  
  6798.        <x0> <y0> <z0,0>
  6799.        <x0> <y1> <z0,1>
  6800.        <x0> <y2> <z0,2>
  6801.         :    :     :
  6802.        <x0> <yN> <z0,N>
  6803.  
  6804.        <x1> <y0> <z1,0>
  6805.        <x1> <y1> <z1,1>
  6806.         :    :     :
  6807.  
  6808.  These triplets are then converted into `gnuplot` iso-curves and then
  6809.  `gnuplot` proceeds in the usual manner to do the rest of the plotting.
  6810.  
  6811.  A collection of matrix and vector manipulation routines (in C) is provided
  6812.  in `binary.c`.  The routine to write binary data is
  6813.  
  6814.        int fwrite_matrix(file,m,nrl,nrl,ncl,nch,row_title,column_title)
  6815.  
  6816.  An example of using these routines is provided in the file `bf_test.c`, which
  6817.  generates binary files for the demo file `demo/binary.dem`.
  6818.  
  6819.  The `index` (*note index:: ) keyword is not supported, since the file format
  6820.  allows only one surface per file.  The `every` (*note every:: ) and  `using`
  6821.  (*note using:: ) filters are supported.  using operates as if the data were
  6822.  read in the above triplet form.
  6823.  
  6824.  
  6825. 
  6826. File: gnuplot.info, Node: example datafile, Prev: binary, Up: data-file, Next: matrix
  6827.  
  6828.  A simple example of plotting a 3-d data file is
  6829.  
  6830.        splot 'datafile.dat'
  6831.  
  6832.  where the file "datafile.dat" might contain:
  6833.  
  6834.        # The valley of the Gnu.
  6835.           0 0 10
  6836.           0 1 10
  6837.           0 2 10
  6838.  
  6839.           1 0 10
  6840.           1 1 5
  6841.           1 2 10
  6842.  
  6843.           2 0 10
  6844.           2 1 1
  6845.           2 2 10
  6846.  
  6847.           3 0 10
  6848.           3 1 0
  6849.           3 2 10
  6850.  
  6851.  Note that "datafile.dat" defines a 4 by 3 grid ( 4 rows of 3 points each ).
  6852.  Rows are separated by blank records.
  6853.  
  6854.  Note also that the x value is held constant within each dataline.  If you
  6855.  instead keep y constant, and plot with hidden-line removal enabled, you will
  6856.  find that the surface is drawn 'inside-out'.
  6857.  
  6858.  Actually for grid data it is not necessary to keep the x values constant
  6859.  within an dataline, nor is it necessary to keep the y values the same along
  6860.  the perpendicular datalines.  `gnuplot` (*note gnuplot:: ) requires only that
  6861.  the number of points be the same for each dataline.
  6862.  
  6863.  
  6864. 
  6865. File: gnuplot.info, Node: matrix, Prev: example datafile, Up: data-file
  6866.  
  6867.  The `matrix` flag indicates that the data are stored in matrix format.  In
  6868.  its present implementation the z-values are read in a row at a time, i. e.,
  6869.        z11 z12 z13 z14 ...
  6870.        z21 z22 z23 z24 ...
  6871.        z31 z32 z33 z34 ...
  6872.  and so forth.  The row and column indices are used for the x- and y-values.
  6873.  used as x, y, and z.
  6874.  
  6875. 
  6876. File: gnuplot.info, Node: test, Prev: splot, Up: Commands, Next: update
  6877.  
  6878.  `test` creates a display of line and point styles and other useful things
  6879.  appropriate for the terminal you are using.
  6880.  
  6881.  Syntax:
  6882.        test
  6883.  
  6884. 
  6885. File: gnuplot.info, Node: update, Prev: test, Up: Commands
  6886.  
  6887.  This command writes the current values of the fit parameters into the given
  6888.  file, which is formatted as an initial-value file (as described in the `fit`
  6889.  (*note fit:: ) section).  This is useful for saving the current values for
  6890.  later use or for restarting a converged or stopped fit.
  6891.  
  6892.  Syntax:
  6893.        update <filename> {<filename>}
  6894.  
  6895.  If the file already exists, `gnuplot` (*note gnuplot:: ) first renames it by
  6896.  appending .old and then opens a new file.  That is, "`update 'fred'`" behaves
  6897.  the same way as "`!rename fred fred.old; update 'fred.old' 'fred'`".  [On DOS
  6898.  and other systems that use the twelve-character "filename.ext" naming
  6899.  convention, "ext" will be "`old`" and "filename" will be related (hopefully
  6900.  recognizably) to the initial name.  Renaming is not done at all on VMS
  6901.  systems, since they use file-versioning.]
  6902.  
  6903.  If a second filename is supplied, the updated values are written to this
  6904.  file instead, and the original parameter file is left unmodified.
  6905.  
  6906.  Please see `fit` for more information.
  6907.  
  6908. 
  6909. File: gnuplot.info, Node: Graphical User Interfaces, Prev: Commands, Up: Top, Next: Bugs
  6910.  
  6911.  Several graphical user interfaces have been written for `gnuplot`
  6912.  (*note gnuplot:: ) and one for win32 is included in this distribution.  In
  6913.  addition, there is a Macintosh interface at
  6914.         ftp://ftp.ee.gatech.edu/pub/mac/gnuplot and several X11 interfaces
  6915.  include three Tcl/Tk located at the usual Tcl/Tk repositories.
  6916.  
  6917.  
  6918. 
  6919. File: gnuplot.info, Node: Bugs, Prev: Graphical User Interfaces, Up: Top
  6920.  
  6921.  The bessel functions do not work for complex arguments.
  6922.  
  6923.  The gamma function does not work for complex arguments.
  6924.  
  6925.  There is a bug in the stdio library for old Sun operating systems (SunOS
  6926.  Sys4-3.2).  The "%g" format for 'printf' sometimes incorrectly prints numbers
  6927.  (e.g., 200000.0 as "2").  Thus, tic mark labels may be incorrect on a Sun4
  6928.  version of `gnuplot` (*note gnuplot:: ).  A work-around is to rescale the data
  6929.  or use the set format` command to change the tic mark format to "%7.0f" or
  6930.  some other appropriate format.  This appears to have been fixed in SunOS 4.0.
  6931.  
  6932.  Another bug: On a Sun3 under SunOS 4.0, and on Sun4's under Sys4-3.2 and
  6933.  SunOS 4.0, the 'sscanf' routine incorrectly parses "00 12" with the format
  6934.  "%f %f" and reads 0 and 0 instead of 0 and 12.  This affects data input.  If
  6935.  the data file contains x coordinates that are zero but are specified like
  6936.  '00', '000', etc, then you will read the wrong y values.  Check any data
  6937.  files or upgrade the SunOS.  It appears to have been fixed in SunOS 4.1.1.
  6938.  
  6939.  Suns appear to overflow when calculating exp(-x) for large x, so `gnuplot`
  6940.  gets an undefined result.  One work-around is to make a user-defined function
  6941.  like e(x) = x<-500 ? 0 : exp(x).  This affects plots of Gaussians (exp(-x*x))
  6942.  in particular, since x*x grows quite rapidly.
  6943.  
  6944.  Microsoft C 5.1 has a nasty bug associated with the %g format for 'printf'.
  6945.  When any of the formats "%.2g", "%.1g", "%.0g", "%.g" are used, 'printf' will
  6946.  incorrectly print numbers in the range 1e-4 to 1e-1.  Numbers that should be
  6947.  printed in the %e format are incorrectly printed in the %f format, with the
  6948.  wrong number of zeros after the decimal point.  To work around this problem,
  6949.  use the %e or %f formats explicitly.
  6950.  
  6951.  `gnuplot`, when compiled with Microsoft C, did not work correctly on two VGA
  6952.  displays that were tested.  The CGA, EGA and VGA drivers should probably be
  6953.  rewritten to use the Microsoft C graphics library.  `gnuplot` compiled with
  6954.  Borland C++ uses the Turbo C graphics drivers and does work correctly with
  6955.  VGA displays.
  6956.  
  6957.  VAX/VMS 4.7 C compiler release 2.4 also has a poorly implemented %g format
  6958.  for 'printf'.  The numbers are printed numerically correct, but may not be in
  6959.  the requested format.  The K&R second edition says that for the %g format, %e
  6960.  is used if the exponent is less than -4 or greater than or equal to the
  6961.  precision.  The VAX uses %e format if the exponent is less than -1.  The VAX
  6962.  appears to take no notice of the precision when deciding whether to use %e or
  6963.  %f for numbers less than 1.  To work around this problem, use the %e or %f
  6964.  formats explicitly.  From the VAX C 2.4 release notes: e,E,f,F,g,G  Result
  6965.  will always contain a decimal  point.  For g and G, trailing zeros will not
  6966.  be removed from the result.
  6967.  
  6968.  VAX/VMS 5.2 C compiler release 3.0 has a slightly better implemented %g
  6969.  format than release 2.4, but not much.  Trailing decimal points are now
  6970.  removed, but trailing zeros are still not removed from %g numbers in
  6971.  exponential format.
  6972.  
  6973.  The two preceding problems are actually in the libraries rather than in the
  6974.  compilers.  Thus the problems will occur whether `gnuplot` is built using
  6975.  either the DEC compiler or some other one (e.g. the latest gcc).
  6976.  
  6977.  ULTRIX X11R3 has a bug that causes the X11 driver to display "every other"
  6978.  graph.  The bug seems to be fixed in DEC's release of X11R4 so newer releases
  6979.  of ULTRIX don't seem to have the problem.  Solutions for older sites include
  6980.  upgrading the X11 libraries (from DEC or direct from MIT) or defining
  6981.  ULTRIX_KLUDGE when compiling the x11.trm file.  Note that the kludge is not
  6982.  an ideal fix, however.
  6983.  
  6984.  The constant HUGE was incorrectly defined in the NeXT OS 2.0 operating
  6985.  system.  HUGE should be set to 1e38 in plot.h. This error has been corrected
  6986.  in the 2.1 version of NeXT OS.
  6987.  
  6988.  Some older models of HP plotters do not have a page eject command 'PG'.  The
  6989.  current HPGL driver uses this command in HPGL_reset.  This may need to be
  6990.  removed for these plotters.  The current PCL5 driver uses HPGL/2 for text as
  6991.  well as graphics.  This should be modified to use scalable PCL fonts.
  6992.  
  6993.  On the Atari version, it is not possible to send output directly to the
  6994.  printer (using `/dev/lp` as output file), since CRs are added to LFs in
  6995.  binary output.  As a work-around, write the output to a file and copy it to
  6996.  the printer afterwards using a shell command.
  6997.  
  6998.  On AIX 4, the literal 'NaNq' in a datafile causes the special internal value
  6999.  'not-a-number' to be stored, rather than setting an internal 'undefined'
  7000.  flag.  A workaround is to use `set missing 'NaNq'`.
  7001.  
  7002.  There may be an up-to-date list of bugs since the release on the WWW page:
  7003.        http://www.cs.dartmouth.edu/gnuplot
  7004.  
  7005.  Please report any bugs to bug-gnuplot@dartmouth.edu.
  7006.